org.sonar.api.batch.rule
Interface ActiveRules

All Superinterfaces:
BatchComponent

public interface ActiveRules
extends BatchComponent

The rules that are activated on the current module. Quality profiles are merged, so rules can relate to different repositories and languages.

Use ActiveRulesBuilder to instantiate this component in unit tests.

Since:
4.2

Method Summary
 ActiveRule find(RuleKey ruleKey)
          Find a ActiveRule by the associated rule key.
 Collection<ActiveRule> findAll()
          All the active rules, whatever their repository and related language.
 Collection<ActiveRule> findByRepository(String repository)
          The active rules for a given repository, like Findbugs
 

Method Detail

find

@CheckForNull
ActiveRule find(RuleKey ruleKey)
Find a ActiveRule by the associated rule key. null is returned if the rule does not exist or if the rule is not activated on any Quality profile associated with the module.


findAll

Collection<ActiveRule> findAll()
All the active rules, whatever their repository and related language.


findByRepository

Collection<ActiveRule> findByRepository(String repository)
The active rules for a given repository, like Findbugs



Copyright © 2009-2014 SonarSource. All Rights Reserved.