org.sonar.api.server.rule
Interface RuleDefinitions.NewExtendedRepository

All Known Subinterfaces:
RuleDefinitions.NewRepository
All Known Implementing Classes:
RuleDefinitions.NewRepositoryImpl
Enclosing interface:
RuleDefinitions

public static interface RuleDefinitions.NewExtendedRepository


Method Summary
 void done()
           
 RuleDefinitions.NewRule loadAnnotatedClass(Class clazz)
          Reads definition of rule from the annotations provided by the library sonar-check-api.
 RuleDefinitions.NewExtendedRepository loadAnnotatedClasses(Class... classes)
          Reads definitions of rules from the annotations provided by the library sonar-check-api.
 RuleDefinitions.NewExtendedRepository loadXml(InputStream xmlInput, String encoding)
          Reads definitions of rules from a XML file.
 RuleDefinitions.NewRule newRule(String ruleKey)
           
 

Method Detail

newRule

RuleDefinitions.NewRule newRule(String ruleKey)

loadAnnotatedClass

RuleDefinitions.NewRule loadAnnotatedClass(Class clazz)
Reads definition of rule from the annotations provided by the library sonar-check-api.


loadAnnotatedClasses

RuleDefinitions.NewExtendedRepository loadAnnotatedClasses(Class... classes)
Reads definitions of rules from the annotations provided by the library sonar-check-api.


loadXml

RuleDefinitions.NewExtendedRepository loadXml(InputStream xmlInput,
                                              String encoding)
Reads definitions of rules from a XML file. Format is :
 <rules>
 <rule>
 <!-- required fields -->
 <key>the-rule-key</key>
 <name>The purpose of the rule</name>
 <description>
 <![CDATA[The description]]>
 </description>

 <!-- optional fields -->
 <internalKey>Checker/TreeWalker/LocalVariableName</internalKey>
 <severity>BLOCKER</severity>
 <cardinality>MULTIPLE</cardinality>
 <status>BETA</status>
 <param>
 <key>the-param-key</key>
 <tag>style</tag>
 <tag>security</tag>
 <description>
 <![CDATA[
 the param-description
 ]]>
 </description>
 <defaultValue>42</defaultValue>
 </param>
 <param>
 <key>another-param</key>
 </param>

 <!-- deprecated fields -->
 <configKey>Checker/TreeWalker/LocalVariableName</configKey>
 <priority>BLOCKER</priority>
 </rule>
 </rules>

 


done

void done()


Copyright © 2009-2014 SonarSource. All Rights Reserved.