Package org.sonar.iac.common.extension
Class IacSensor
java.lang.Object
org.sonar.iac.common.extension.IacSensor
- All Implemented Interfaces:
org.sonar.api.batch.sensor.Sensor,org.sonar.api.scanner.sensor.ProjectSensor
- Direct Known Subclasses:
YamlSensor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.sonar.api.measures.FileLinesContextFactoryprotected final org.sonar.api.resources.Languageprotected final org.sonar.api.issue.NoSonarFilterprotected final org.sonar.api.SonarRuntime -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIacSensor(org.sonar.api.SonarRuntime sonarRuntime, org.sonar.api.measures.FileLinesContextFactory fileLinesContextFactory, org.sonar.api.issue.NoSonarFilter noSonarFilter, org.sonar.api.resources.Language language) -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribe(org.sonar.api.batch.sensor.SensorDescriptor descriptor) voidexecute(org.sonar.api.batch.sensor.SensorContext sensorContext) protected abstract Stringprotected voidimportExternalReports(org.sonar.api.batch.sensor.SensorContext sensorContext) protected booleanisNotSonarLintContext(org.sonar.api.batch.sensor.SensorContext sensorContext) protected org.sonar.api.batch.fs.FilePredicatemainFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext) protected abstract Stringprotected ParseExceptiontoParseException(String action, org.sonar.api.batch.fs.InputFile inputFile, Exception cause) protected abstract TreeParser<Tree>protected abstract List<TreeVisitor<InputFileContext>>visitors(org.sonar.api.batch.sensor.SensorContext sensorContext, DurationStatistics statistics)
-
Field Details
-
sonarRuntime
protected final org.sonar.api.SonarRuntime sonarRuntime -
fileLinesContextFactory
protected final org.sonar.api.measures.FileLinesContextFactory fileLinesContextFactory -
noSonarFilter
protected final org.sonar.api.issue.NoSonarFilter noSonarFilter -
language
protected final org.sonar.api.resources.Language language
-
-
Constructor Details
-
IacSensor
protected IacSensor(org.sonar.api.SonarRuntime sonarRuntime, org.sonar.api.measures.FileLinesContextFactory fileLinesContextFactory, org.sonar.api.issue.NoSonarFilter noSonarFilter, org.sonar.api.resources.Language language)
-
-
Method Details
-
describe
public void describe(org.sonar.api.batch.sensor.SensorDescriptor descriptor) - Specified by:
describein interfaceorg.sonar.api.scanner.sensor.ProjectSensor- Specified by:
describein interfaceorg.sonar.api.batch.sensor.Sensor
-
treeParser
-
repositoryKey
-
visitors
protected abstract List<TreeVisitor<InputFileContext>> visitors(org.sonar.api.batch.sensor.SensorContext sensorContext, DurationStatistics statistics) -
getActivationSettingKey
-
execute
public void execute(org.sonar.api.batch.sensor.SensorContext sensorContext) - Specified by:
executein interfaceorg.sonar.api.scanner.sensor.ProjectSensor- Specified by:
executein interfaceorg.sonar.api.batch.sensor.Sensor
-
mainFilePredicate
protected org.sonar.api.batch.fs.FilePredicate mainFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext) -
importExternalReports
protected void importExternalReports(org.sonar.api.batch.sensor.SensorContext sensorContext) -
isNotSonarLintContext
protected boolean isNotSonarLintContext(org.sonar.api.batch.sensor.SensorContext sensorContext) -
toParseException
protected ParseException toParseException(String action, org.sonar.api.batch.fs.InputFile inputFile, Exception cause)
-