Package org.sonar.api.batch.rule
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.lang.String
internalKey()
Optional key declared and used by the underlying rule engine.java.lang.String
language()
Language of rule, for examplejava
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
-
ruleKey
RuleKey ruleKey()
-
severity
java.lang.String severity()
Non-null severity.- See Also:
Severity
-
language
java.lang.String language()
Language of rule, for examplejava
-
param
@CheckForNull java.lang.String param(java.lang.String key)
Value of given parameter. Returnsnull
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 likecom.puppycrawl.tools.checkstyle.checks.FooCheck
whereas its internal key can beChecker/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
-
-