Interface SensorDescriptor

    • Method Detail

      • name

        SensorDescriptor name​(java.lang.String sensorName)
        Displayable name of the Sensor. Will be displayed in logs.
      • onlyOnLanguage

        SensorDescriptor onlyOnLanguage​(java.lang.String languageKey)
        Language this Sensor work on. Used by the platform to skip execution of the Sensor when no file for given languages are present in the project. Default is to execute sensor for all languages.
      • onlyOnLanguages

        SensorDescriptor onlyOnLanguages​(java.lang.String... languageKeys)
        List languages this Sensor work on. Used by the platform to skip execution of the Sensor when no file for given languages are present in the project. Default is to execute sensor for all languages.
      • onlyOnFileType

        SensorDescriptor onlyOnFileType​(InputFile.Type type)
        InputFile.Type this Sensor work on. Used by the platform to skip execution of the Sensor when no file for given type are present in the project. Default is to execute sensor whatever are the available file types.
      • createIssuesForRuleRepository

        SensorDescriptor createIssuesForRuleRepository​(java.lang.String... repositoryKey)
        Rule repository this Sensor create issues for. Used by the platform to skip execution of the Sensor when no rule is activated for the given repository.
      • createIssuesForRuleRepositories

        SensorDescriptor createIssuesForRuleRepositories​(java.lang.String... repositoryKeys)
        List rule repositories this Sensor create issues for. Used by the platform to skip execution of the Sensor when no rule is activated for the given repositories.
      • global

        @Deprecated
        SensorDescriptor global()
        Deprecated.
        since 7.6 change your Sensor to a ProjectSensor instead
        This sensor should be executed at the project level, instead of per-module.
        Since:
        6.4
      • onlyWhenConfiguration

        SensorDescriptor onlyWhenConfiguration​(java.util.function.Predicate<Configuration> predicate)
        Predicate that will be evaluated on current project Configuration by the platform to decide if execution of the Sensor should be skipped.
        Since:
        6.5