Class 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 Detail

      • 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 Detail

      • 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 Detail

      • 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
      • repositoryKey

        protected abstract String repositoryKey()
      • 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)