Examples of errors detected by the V3023 diagnostic.


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;
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
On our website we use a cookie to collect information of a technical nature.
If you do not agree, please leave the site. Learn More →
Do not show again