Примеры ошибок, обнаруженных с помощью диагностики V3023


V3023. Consider inspecting this expression. The expression is excessive or contains a misprint.


SharpDevelop

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. CSharpCompletionEngine.cs 2392


IEnumerable<ICompletionData>
CreateConstructorCompletionData(IType hintType)
{
  ....
  if (!(hintType.Kind == TypeKind.Interface &&
        hintType.Kind != TypeKind.Array)) {
  ....
}

MonoDevelop

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. ICSharpCode.NRefactory.CSharp CSharpCompletionEngine.cs 2397


IEnumerable<ICompletionData>
  CreateConstructorCompletionData(IType hintType)
{
  ....
  if (!(hintType.Kind == TypeKind.Interface &&
        hintType.Kind != TypeKind.Array))
  ....
}

MonoDevelop

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. MonoDevelop.Ide AddinsUpdateHandler.cs 97


void OnUpdateClicked (object s,
        StatusBarIconClickedEventArgs args)
{
  if (args.Button !=  Xwt.PointerButton.Right &&
      args.Button == Xwt.PointerButton.Left) {
    HideAlert ();
    AddinManagerWindow.Run (IdeApp.Workbench.RootWindow);
  }
}

IronPython and IronRuby

V3023 Consider inspecting the 'c == 0 || c != 32' expression. The expression is excessive or contains a misprint. Emitter.cs 308


private void WriteSingleQuoted(string text, bool split) {
  ....
  while (ending <= text.Length) {
    c = '\0';
    if (ending < text.Length) {
      c = text[ending];
    }
    if (spaces) {
      if (c == 0 || c != 32) {
  ....
}

.NET Compiler Platform ("Roslyn")

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. RoslynEventSource.cs 79


public enum EventCommand
{
  Disable = -3,
  Enable = -2,
  SendManifest = -1,
  Update = 0
}

protected override void OnEventCommand(
  EventCommandEventArgs command)
{
  base.OnEventCommand(command);

  if (command.Command == EventCommand.SendManifest ||
      command.Command != EventCommand.Disable ||
       FunctionDefinitionRequested(command))
  ....
}

Sony ATF

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. Atf.Gui.Wpf.vs2010 SynchronizeInvoke.cs 74


public DispatcherOperationStatus Status { get; }
public enum DispatcherOperationStatus
{
  Pending,
  Aborted,
  Completed,
  Executing
}

public object EndInvoke(IAsyncResult result)
{
  DispatcherAsyncResultAdapter res =
    result as DispatcherAsyncResultAdapter;
  if (res == null)
    throw new InvalidCastException();

  while (res.Operation.Status !=
           DispatcherOperationStatus.Completed
         ||
         res.Operation.Status ==
           DispatcherOperationStatus.Aborted)
  {
    Thread.Sleep(50);
  }

  return res.Operation.Result;
}

Xenko

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. SiliconStudio.Assets Diff3Node.cs 70


public enum Diff3ChangeType
{
  None,
  Children,
  MergeFromAsset1,
  MergeFromAsset2,
  MergeFromAsset1And2,
  Conflict,
  ConflictType,
  ConflictArraySize,
  InvalidNodeType,
}

private static bool CheckVisitChildren(Diff3Node diff3)
{
  return diff3.ChangeType == Diff3ChangeType.Children ||
           diff3.ChangeType != Diff3ChangeType.None;
}

Azure PowerShell

V3023 Consider inspecting this expression. The expression is excessive or contains a misprint. PolicyRetentionObjects.cs 207


public virtual void Validate()
{
  if (RetentionTimes == null
    || RetentionTimes.Count == 0
    || RetentionTimes.Count != 1)
  {
    throw new ArgumentException(
      Resources.InvalidRetentionTimesInPolicyException);
  }
}


Найденные ошибки

Проверено проектов
361
Собрано ошибок
13 417

А ты совершаешь ошибки в коде?

Проверь с помощью
PVS-Studio

Статический анализ
кода для C, C++, C#
и Java

goto PVS-Studio;