Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | name="ONOS Rules" |
| 4 | xmlns="http://pmd.sf.net/ruleset/1.0.0" |
| 5 | xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" |
| 6 | xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" > |
| 7 | |
| 8 | <description>ONOS PMD rules</description> |
| 9 | |
| 10 | <rule ref="rulesets/java/unnecessary.xml" > |
| 11 | <exclude name="UselessParentheses" /> |
| 12 | </rule> |
| 13 | <rule ref="rulesets/java/basic.xml"> |
| 14 | <exclude name="EmptyCatchBlock"/> |
| 15 | </rule> |
| 16 | <rule ref="rulesets/java/basic.xml/EmptyCatchBlock"> |
| 17 | <properties> |
| 18 | <property name="allowCommentedBlocks" value="true"/> |
| 19 | </properties> |
| 20 | </rule> |
| 21 | <rule ref="rulesets/java/unusedcode.xml"/> |
| 22 | <rule ref="rulesets/java/imports.xml"/> |
| 23 | <rule ref="rulesets/java/optimizations.xml"> |
| 24 | <exclude name="LocalVariableCouldBeFinal" /> |
| 25 | <exclude name="MethodArgumentCouldBeFinal" /> |
| 26 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 27 | </rule> |
| 28 | |
| 29 | <rule ref="rulesets/java/strings.xml"> |
| 30 | <exclude name="AvoidDuplicateLiterals" /> |
| 31 | </rule> |
| 32 | <rule ref="rulesets/java/braces.xml"/> |
| 33 | <rule ref="rulesets/java/naming.xml"> |
| 34 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 35 | <exclude name="ShortMethodName" /> |
| 36 | <exclude name="ShortVariable" /> |
| 37 | <exclude name="LongVariable" /> |
| 38 | </rule> |
Ray Milkey | ec49771 | 2014-03-20 17:51:22 -0700 | [diff] [blame] | 39 | <rule ref="rulesets/java/naming.xml/VariableNamingConventions"> |
| 40 | <properties> |
| 41 | <!-- ONOS allows the name "log" for static final Loggers --> |
| 42 | <property name="violationSuppressRegex" value=".*'log'.*"/> |
| 43 | </properties> |
| 44 | </rule> |
| 45 | |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 46 | <rule ref="rulesets/java/clone.xml"/> |
| 47 | <rule ref="rulesets/java/strictexception.xml"/> |
| 48 | <rule ref="rulesets/java/design.xml"> |
| 49 | <exclude name="GodClass" /> |
| 50 | </rule> |
| 51 | <rule ref="rulesets/java/coupling.xml"> |
| 52 | <exclude name="LawOfDemeter" /> |
| 53 | <exclude name="ExcessiveImports" /> |
| 54 | </rule> |
| 55 | </ruleset> |