Class PythonIndexer

java.lang.Object
org.sonar.plugins.python.indexer.PythonIndexer
Direct Known Subclasses:
SonarLintPythonIndexer, SonarQubePythonIndexer

public abstract class PythonIndexer extends Object
  • Field Details

    • projectBaseDirAbsolutePath

      protected String projectBaseDirAbsolutePath
  • Constructor Details

    • PythonIndexer

      public PythonIndexer()
  • Method Details

    • projectLevelSymbolTable

      public ProjectLevelSymbolTable projectLevelSymbolTable()
    • packageName

      public String packageName(PythonInputFile inputFile)
    • collectPackageNames

      public void collectPackageNames(List<PythonInputFile> inputFiles)
    • buildOnce

      public abstract void buildOnce(org.sonar.api.batch.sensor.SensorContext context)
    • postAnalysis

      public abstract void postAnalysis(org.sonar.api.batch.sensor.SensorContext context)
    • setSonarLintCache

      public void setSonarLintCache(@Nullable SonarLintCache sonarLintCache)
    • getFileWithId

      @CheckForNull public org.sonar.api.batch.fs.InputFile getFileWithId(String fileId)
    • canBePartiallyScannedWithoutParsing

      public boolean canBePartiallyScannedWithoutParsing(PythonInputFile inputFile)
      Parameters:
      inputFile -
      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)
      Parameters:
      inputFile -
      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 abstract CacheContext cacheContext()