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

public abstract class IacSensor extends Object implements org.sonar.api.batch.sensor.Sensor
  • 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:
      describe in interface org.sonar.api.scanner.sensor.ProjectSensor
      Specified by:
      describe in interface org.sonar.api.batch.sensor.Sensor
    • treeParser

      protected abstract TreeParser<Tree> treeParser()
    • repositoryKey

      protected abstract String repositoryKey()
    • visitors

      protected abstract List<TreeVisitor<InputFileContext>> visitors(org.sonar.api.batch.sensor.SensorContext sensorContext, DurationStatistics statistics)
    • getActivationSettingKey

      protected abstract String getActivationSettingKey()
    • execute

      public void execute(org.sonar.api.batch.sensor.SensorContext sensorContext)
      Specified by:
      execute in interface org.sonar.api.scanner.sensor.ProjectSensor
      Specified by:
      execute in interface org.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)