Package org.sonar.iac.common.yaml
Class YamlSensor
- java.lang.Object
-
- org.sonar.iac.common.extension.IacSensor
-
- org.sonar.iac.common.yaml.YamlSensor
-
- All Implemented Interfaces:
org.sonar.api.batch.sensor.Sensor,org.sonar.api.scanner.sensor.ProjectSensor
public abstract class YamlSensor extends IacSensor
-
-
Field Summary
Fields Modifier and Type Field Description protected org.sonar.api.batch.rule.Checks<IacCheck>checksprotected static StringFILE_SEPERATORprotected static StringJSON_LANGUAGE_KEYprotected static StringYAML_LANGUAGE_KEY-
Fields inherited from class org.sonar.iac.common.extension.IacSensor
fileLinesContextFactory, language, noSonarFilter
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedYamlSensor(org.sonar.api.SonarRuntime sonarRuntime, org.sonar.api.measures.FileLinesContextFactory fileLinesContextFactory, org.sonar.api.batch.rule.CheckFactory checkFactory, org.sonar.api.issue.NoSonarFilter noSonarFilter, org.sonar.api.resources.Language language, List<Class<?>> checks)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.sonar.api.batch.fs.FilePredicatecustomFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext)voiddescribe(org.sonar.api.batch.sensor.SensorDescriptor descriptor)protected org.sonar.api.batch.fs.FilePredicatemainFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext)protected ParseExceptiontoParseException(String action, org.sonar.api.batch.fs.InputFile inputFile, Exception cause)protected TreeParser<Tree>treeParser()protected List<TreeVisitor<InputFileContext>>visitors(org.sonar.api.batch.sensor.SensorContext sensorContext, DurationStatistics statistics)-
Methods inherited from class org.sonar.iac.common.extension.IacSensor
execute, getActivationSettingKey, importExternalReports, isSonarLintContext, repositoryKey
-
-
-
-
Field Detail
-
JSON_LANGUAGE_KEY
protected static final String JSON_LANGUAGE_KEY
- See Also:
- Constant Field Values
-
YAML_LANGUAGE_KEY
protected static final String YAML_LANGUAGE_KEY
- See Also:
- Constant Field Values
-
FILE_SEPERATOR
protected static final String FILE_SEPERATOR
- See Also:
- Constant Field Values
-
checks
protected final org.sonar.api.batch.rule.Checks<IacCheck> checks
-
-
Constructor Detail
-
YamlSensor
protected YamlSensor(org.sonar.api.SonarRuntime sonarRuntime, org.sonar.api.measures.FileLinesContextFactory fileLinesContextFactory, org.sonar.api.batch.rule.CheckFactory checkFactory, org.sonar.api.issue.NoSonarFilter noSonarFilter, org.sonar.api.resources.Language language, List<Class<?>> checks)
-
-
Method Detail
-
describe
public void describe(org.sonar.api.batch.sensor.SensorDescriptor descriptor)
-
treeParser
protected TreeParser<Tree> treeParser()
- Specified by:
treeParserin classIacSensor
-
visitors
protected List<TreeVisitor<InputFileContext>> visitors(org.sonar.api.batch.sensor.SensorContext sensorContext, DurationStatistics statistics)
-
toParseException
protected ParseException toParseException(String action, org.sonar.api.batch.fs.InputFile inputFile, Exception cause)
- Overrides:
toParseExceptionin classIacSensor
-
mainFilePredicate
protected org.sonar.api.batch.fs.FilePredicate mainFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext)
- Overrides:
mainFilePredicatein classIacSensor
-
customFilePredicate
protected abstract org.sonar.api.batch.fs.FilePredicate customFilePredicate(org.sonar.api.batch.sensor.SensorContext sensorContext)
-
-