Class Scanner

java.lang.Object
org.sonar.plugins.python.Scanner
Direct Known Subclasses:
PythonScanner

public abstract class Scanner extends Object
  • Field Details

    • context

      protected final org.sonar.api.batch.sensor.SensorContext context
  • Constructor Details

    • Scanner

      protected Scanner(org.sonar.api.batch.sensor.SensorContext context)
  • Method Details

    • execute

      public void execute(List<PythonInputFile> files, org.sonar.api.batch.sensor.SensorContext context)
    • processFiles

      protected void processFiles(List<PythonInputFile> files, org.sonar.api.batch.sensor.SensorContext context, MultiFileProgressReport progressReport, AtomicInteger numScannedWithoutParsing)
    • logStart

      protected abstract void logStart(int numThreads)
    • getFilesStream

      protected Stream<PythonInputFile> getFilesStream(List<PythonInputFile> files)
    • name

      protected abstract String name()
    • scanFile

      protected abstract void scanFile(PythonInputFile file) throws IOException
      Throws:
      IOException
    • scanFileWithoutParsing

      protected boolean scanFileWithoutParsing(PythonInputFile file) throws IOException
      Throws:
      IOException
    • endOfAnalysis

      protected void endOfAnalysis()
    • processException

      protected abstract void processException(Exception e, PythonInputFile file)
    • reportStatistics

      protected void reportStatistics(int numSkippedFiles, int numTotalFiles)
    • canBeScannedWithoutParsing

      public boolean canBeScannedWithoutParsing(PythonInputFile inputFile)
    • getNumberOfThreads

      protected abstract int getNumberOfThreads(org.sonar.api.batch.sensor.SensorContext context)