Class NoSonarFilter


  • @ScannerSide
    public abstract class NoSonarFilter
    extends java.lang.Object
    Issue filter used to ignore issues created on lines commented with the tag "NOSONAR".
    Plugins, via Sensors, must feed this filter by registering the lines that contain "NOSONAR". Note that filters are disabled for the issues reported by end-users from UI or web services.
    Since:
    3.6
    • Constructor Summary

      Constructors 
      Constructor Description
      NoSonarFilter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract NoSonarFilter noSonarInFile​(InputFile inputFile, java.util.Set<java.lang.Integer> noSonarLines)
      Register lines in a file that contains the NOSONAR flag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoSonarFilter

        public NoSonarFilter()
    • Method Detail

      • noSonarInFile

        public abstract NoSonarFilter noSonarInFile​(InputFile inputFile,
                                                    java.util.Set<java.lang.Integer> noSonarLines)
        Register lines in a file that contains the NOSONAR flag.
        Parameters:
        inputFile -
        noSonarLines - Line number starts at 1 in a file
        Since:
        5.0, 7.6 the method can be called multiple times by different sensors, and NOSONAR lines are merged