Interface ActiveRule


  • @Immutable
    public interface ActiveRule
    Configuration of a rule activated on a Quality profile
    Since:
    4.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<SoftwareQuality,​Severity> impacts()
      Overridden impact severities from the rule.
      java.lang.String internalKey()
      Optional key declared and used by the underlying rule engine.
      java.lang.String language()
      Language of rule, for example java
      java.lang.String param​(java.lang.String key)
      Value of given parameter.
      java.util.Map<java.lang.String,​java.lang.String> params()
      Immutable parameter values.
      java.lang.String qpKey()
      Key of the quality profile the rule belongs to.
      RuleKey ruleKey()  
      java.lang.String severity()
      Non-null severity.
      java.lang.String templateRuleKey()
      Optional rule key of the template rule.
    • Method Detail

      • severity

        java.lang.String severity()
        Non-null severity.
        See Also:
        Severity
      • language

        java.lang.String language()
        Language of rule, for example java
      • param

        @CheckForNull
        java.lang.String param​(java.lang.String key)
        Value of given parameter. Returns null if the parameter key does not exist on the rule or if the parameter has no value nor default value.
      • params

        java.util.Map<java.lang.String,​java.lang.String> params()
        Immutable parameter values. Returns an empty map if no parameters are defined.
      • internalKey

        @CheckForNull
        java.lang.String internalKey()
        Optional key declared and used by the underlying rule engine. As an example the key of a Checkstyle rule looks like com.puppycrawl.tools.checkstyle.checks.FooCheck whereas its internal key can be Checker/TreeWalker/Foo.
      • templateRuleKey

        @CheckForNull
        java.lang.String templateRuleKey()
        Optional rule key of the template rule.
        Since:
        4.5.3
      • qpKey

        java.lang.String qpKey()
        Key of the quality profile the rule belongs to.
        Since:
        7.5