Class SonarQubePythonIndexer

java.lang.Object
org.sonar.plugins.python.indexer.PythonIndexer
org.sonar.plugins.python.indexer.SonarQubePythonIndexer

public class SonarQubePythonIndexer extends PythonIndexer
  • Field Details

    • SONAR_CAN_SKIP_UNCHANGED_FILES_KEY

      public static final String SONAR_CAN_SKIP_UNCHANGED_FILES_KEY
      Describes if an optimized analysis of unchanged by skipping some rules is enabled. By default, the property is not set (null), leaving SQ/SC to decide whether to enable this behavior. Setting it to true or false, forces the behavior from the analyzer independently of the server.
      See Also:
  • Constructor Details

    • SonarQubePythonIndexer

      public SonarQubePythonIndexer(List<PythonInputFile> inputFiles, CacheContext cacheContext, org.sonar.api.batch.sensor.SensorContext context)
  • Method Details

    • buildOnce

      public void buildOnce(org.sonar.api.batch.sensor.SensorContext context)
      Specified by:
      buildOnce in class PythonIndexer
    • postAnalysis

      public void postAnalysis(org.sonar.api.batch.sensor.SensorContext context)
      Specified by:
      postAnalysis in class PythonIndexer
    • computeGlobalSymbols

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

      public boolean canBePartiallyScannedWithoutParsing(PythonInputFile inputFile)
      Overrides:
      canBePartiallyScannedWithoutParsing in class PythonIndexer
      Returns:
      true if a file is partially skippable, false otherwise We consider a file to be partially skippable if it is unchanged, but may depend on impacted files. Regular Python rules will not run on such files. Security UCFGs and DBD IRs will be regenerated for them if they do depend on impacted files. In such case, these files will still need to be parsed when Security or DBD rules are enabled.
    • canBeFullyScannedWithoutParsing

      public boolean canBeFullyScannedWithoutParsing(PythonInputFile inputFile)
      Overrides:
      canBeFullyScannedWithoutParsing in class PythonIndexer
      Returns:
      true if a file is fully skippable, false otherwise We consider a file to be fully skippable if it is unchanged and does NOT depend on any impacted file. Regular Python rules will not run on these files. Security UCFGs and DBD IRs will be retrieved from the cache. These files will not be parsed.
    • cacheContext

      public CacheContext cacheContext()
      Specified by:
      cacheContext in class PythonIndexer