Interface NewAdHocRule


  • public interface NewAdHocRule
    Builder for a rule imported from an external rule engine by a Sensor. This allows to provide more metadata for rules associated to ExternalIssue. Don't forget to save() after setting the fields.
    Since:
    7.4
    • Method Detail

      • engineId

        NewAdHocRule engineId​(java.lang.String engineId)
        Unique identifier of the external analyzer (e.g. eslint, pmd, ...)
      • name

        NewAdHocRule name​(java.lang.String name)
        The name of the rule.
      • description

        NewAdHocRule description​(@Nullable
                                 java.lang.String description)
        The description of the rule.
      • cleanCodeAttribute

        NewAdHocRule cleanCodeAttribute​(CleanCodeAttribute attribute)
        Clean Code Attribute of the rule. Providing it is optional for now but will become mandatory in the future.
        Since:
        10.1
      • save

        void save()
        Save the rule. There is almost no validation, except that no duplicated ad hoc rule keys are permitted.