Package org.sonar.plugins.python.indexer
Class SonarQubePythonIndexer
java.lang.Object
org.sonar.plugins.python.indexer.PythonIndexer
org.sonar.plugins.python.indexer.SonarQubePythonIndexer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDescribes if an optimized analysis of unchanged by skipping some rules is enabled.Fields inherited from class org.sonar.plugins.python.indexer.PythonIndexer
projectBaseDirAbsolutePath -
Constructor Summary
ConstructorsConstructorDescriptionSonarQubePythonIndexer(List<PythonInputFile> inputFiles, CacheContext cacheContext, org.sonar.api.batch.sensor.SensorContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildOnce(org.sonar.api.batch.sensor.SensorContext context) booleancanBeFullyScannedWithoutParsing(PythonInputFile inputFile) booleanvoidcomputeGlobalSymbols(List<PythonInputFile> files, org.sonar.api.batch.sensor.SensorContext context) voidpostAnalysis(org.sonar.api.batch.sensor.SensorContext context) Methods inherited from class org.sonar.plugins.python.indexer.PythonIndexer
collectPackageNames, getFileWithId, packageName, projectLevelSymbolTable, setSonarLintCache
-
Field Details
-
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:
buildOncein classPythonIndexer
-
postAnalysis
public void postAnalysis(org.sonar.api.batch.sensor.SensorContext context) - Specified by:
postAnalysisin classPythonIndexer
-
computeGlobalSymbols
public void computeGlobalSymbols(List<PythonInputFile> files, org.sonar.api.batch.sensor.SensorContext context) -
canBePartiallyScannedWithoutParsing
- Overrides:
canBePartiallyScannedWithoutParsingin classPythonIndexer- 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
- Overrides:
canBeFullyScannedWithoutParsingin classPythonIndexer- 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
- Specified by:
cacheContextin classPythonIndexer
-