Package org.sonar.plugins.python
Class TestFileClassifier
java.lang.Object
org.sonar.plugins.python.TestFileClassifier
Heuristic classifier used when
sonar.tests is not configured.
Determines whether a file should be treated as a test file for rule-execution
purposes, without affecting metric computation (which always uses the platform
InputFile#type()).-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisTestSourceConfigured(org.sonar.api.config.Configuration config) Returnstruewhen the project configuration explicitly controls which files are test files, making the path-based heuristic unnecessary.
-
Method Details
-
isTestSourceConfigured
public static boolean isTestSourceConfigured(org.sonar.api.config.Configuration config) Returnstruewhen the project configuration explicitly controls which files are test files, making the path-based heuristic unnecessary. BothPythonScannerandSonarQubePythonIndexeruse this to decide whether to activate (and cache) the heuristic.
-