Package org.sonar.api.batch.rule
Interface ActiveRules
-
- All Known Implementing Classes:
DefaultActiveRules
@Immutable @ScannerSide public interface ActiveRules
The rules that are activated on the current project. Quality profiles are merged, so rules can relate to different repositories and languages.
UseActiveRulesBuilderto instantiate this component in unit tests.- Since:
- 4.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActiveRulefind(RuleKey ruleKey)Find aActiveRuleby the associated rule key.java.util.Collection<ActiveRule>findAll()All the active rules, whatever their repository and related language.ActiveRulefindByInternalKey(java.lang.String repository, java.lang.String internalKey)Find aActiveRuleby the associated internal key.java.util.Collection<ActiveRule>findByLanguage(java.lang.String language)The active rules for a given language, likejavajava.util.Collection<ActiveRule>findByRepository(java.lang.String repository)The active rules for a given repository, likefindbugs
-
-
-
Method Detail
-
find
@CheckForNull ActiveRule find(RuleKey ruleKey)
Find aActiveRuleby the associated rule key.nullis returned if the rule does not exist or if the rule is not activated on any Quality profile associated with the project.
-
findAll
java.util.Collection<ActiveRule> findAll()
All the active rules, whatever their repository and related language.
-
findByRepository
java.util.Collection<ActiveRule> findByRepository(java.lang.String repository)
The active rules for a given repository, likefindbugs
-
findByLanguage
java.util.Collection<ActiveRule> findByLanguage(java.lang.String language)
The active rules for a given language, likejava
-
findByInternalKey
@CheckForNull ActiveRule findByInternalKey(java.lang.String repository, java.lang.String internalKey)
Find aActiveRuleby the associated internal key.nullis returned if the rule does not exist or if the rule is not activated on any Quality profile associated with the project.
-
-