Examples of errors detected by the V3030 diagnostic.

V3030. Recurring check. This condition was already verified in previous line.


SharpDevelop

V3030 Recurring check. The 'location != null' condition was already verified in line 585. CSharpParser.cs 586


public override void Visit(Struct s)
{
  ....
  if (location != null && location.Count > 2) {
    if (location != null && curLoc < location.Count)
      newType.AddChild(....);
  ....
}

Identical errors can be found in some other places:

  • V3030 Recurring check. The 'location != null' condition was already verified in line 630. CSharpParser.cs 631
  • V3030 Recurring check. The 'location != null' condition was already verified in line 723. CSharpParser.cs 724

Microsoft Code Contracts

V3030 Recurring check. The 'this.lineOffsets == null' condition was already verified in line 612. Nodes.cs 613


public virtual void InsertOrDeleteLines(....)
{
  ....
  if (this.lineOffsets == null)
    if (this.lineOffsets == null) this.ComputeLineOffsets();
  if (lineCount < 0)
    this.DeleteLines(offset, -lineCount);
  else
    this.InsertLines(offset, lineCount);
  ....
}

.NET Core Libraries (CoreFX)

V3030 Recurring check. The 'baseTableRowCounts == null' condition was already verified in line 68. MetadataAggregator.cs 70


private MetadataAggregator(....)
{
  ....
  if (baseTableRowCounts == null)                           // <=
  {
    if (baseReader == null)
    {
      throw new ArgumentNullException("deltaReaders");
    }

    if (baseReader.GetTableRowCount(TableIndex.EncMap) != 0)
    {
      throw new ArgumentException("....", "baseReader");
    }

    CalculateBaseCounts(baseReader, out baseTableRowCounts, // <=
                                    out baseHeapSizes);
  }
  else
  {
    if (baseTableRowCounts == null)                         // <=
    {
      throw new ArgumentNullException("baseTableRowCounts");
    }

    ....
  }
  ....
}

IronPython and IronRuby

V3030 Recurring check. The 'cls != null' condition was already verified in line 373. LibraryDef.cs 374


public void ReflectTypes(Type[]/*!*/ allTypes) {
  ....
  def.Super = null;
  if (cls != null && def.Extends != typeof(BasicObject)
    && !def.Extends.IsInterface) {
    if (cls != null && cls.Inherits != null) {
      def.Super = new TypeRef(cls.Inherits);
  ....
}

PascalABC.NET

V3030 Recurring check. The 'upperScopeWhereVarsAreCaptured != scope' condition was already verified in line 383. TreeConverter CapturedVariablesSubstitutionClassGenerator.cs 391


private void VisitCapturedVar(....)
{
  ....
  if (upperScopeWhereVarsAreCaptured != scope)
  {
    ....
    if (upperScopeWhereVarsAreCaptured != scope)
    {
      ....
    }
    ....
  }
  ....
}

Identical errors can be found in some other places:

  • V3030 Recurring check. The 'kav.Count == 0' condition was already verified in line 2515. ParserTools DefaultLanguageInformation.cs 2518
  • V3030 Recurring check. The 'ret_tn != null' condition was already verified in line 289. CodeCompletion FindReferences.cs 291
  • V3030 Recurring check. The 'kav.Count == 0' condition was already verified in line 885. VBNETParser LanguageInformation.cs 888


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;