Examples of errors detected by the V3053 diagnostic.

V3053. An excessive expression. Examine the substrings "abc" and "abcd".


GitExtensions

V3053 An excessive expression. Examine the substrings 'notepad' and 'notepad++'. GitCommands GitModule.cs 691


public void EditNotes(string revision)
{
  string editor = GetEffectivePathSetting("core.editor")
                  .ToLower();

  if (editor.Contains("gitextensions") ||
      editor.Contains("notepad") ||
      editor.Contains("notepad++")) // <=
  {
    RunGitCmd("notes edit " + revision);
  }
  ....
}

Orchard CMS

V3053 An excessive expression. Examine the substrings ' ' and ' \t'. ExtensionHarvester.cs 335


private static bool IsFeatureFieldDeclaration(string line) {
  if (line.StartsWith("\t\t") ||
      line.StartsWith("\t    ") ||
      line.StartsWith("    ") ||
      line.StartsWith("    \t"))
          return true;

  return false;
}

SharpDevelop

V3053 An excessive expression. Examine the substrings '/debug' and '/debugport'. NDebugger.cs 287


public bool IsKernelDebuggerEnabled {
  get {
    ....
    if (systemStartOptions.Contains("/debug") ||
     systemStartOptions.Contains("/crashdebug") ||
     systemStartOptions.Contains("/debugport") ||
     systemStartOptions.Contains("/baudrate")) {
      return true;
    }
    ....
  }
}

PascalABC.NET

V3053 An excessive expression. Examine the substrings 'reduction' and 'reduction('. TreeConverter OpenMP.cs 267


private void ProcessClauses(string Text, ....)
{
  ....
  if (....)
  {
    ....
  }
  else if (AllowReduction &&
           (Text.StartsWith("reduction") ||
            Text.StartsWith("reduction(")))
  {
    ....
  }
  ....
}


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;