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> |
Yuta HIGUCHI | e28831a | 2014-03-24 17:17:48 -0700 | [diff] [blame] | 21 | <rule ref="rulesets/java/unusedcode.xml"> |
| 22 | <!-- Explicit public keyword in interface methods is acceptable --> |
| 23 | <exclude name="UnusedModifier" /> |
| 24 | </rule> |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 25 | <rule ref="rulesets/java/imports.xml"/> |
| 26 | <rule ref="rulesets/java/optimizations.xml"> |
| 27 | <exclude name="LocalVariableCouldBeFinal" /> |
| 28 | <exclude name="MethodArgumentCouldBeFinal" /> |
| 29 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 30 | </rule> |
| 31 | |
| 32 | <rule ref="rulesets/java/strings.xml"> |
| 33 | <exclude name="AvoidDuplicateLiterals" /> |
| 34 | </rule> |
| 35 | <rule ref="rulesets/java/braces.xml"/> |
| 36 | <rule ref="rulesets/java/naming.xml"> |
| 37 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 38 | <exclude name="ShortMethodName" /> |
| 39 | <exclude name="ShortVariable" /> |
| 40 | <exclude name="LongVariable" /> |
| 41 | </rule> |
Ray Milkey | ec49771 | 2014-03-20 17:51:22 -0700 | [diff] [blame] | 42 | <rule ref="rulesets/java/naming.xml/VariableNamingConventions"> |
| 43 | <properties> |
| 44 | <!-- ONOS allows the name "log" for static final Loggers --> |
| 45 | <property name="violationSuppressRegex" value=".*'log'.*"/> |
| 46 | </properties> |
| 47 | </rule> |
| 48 | |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 49 | <rule ref="rulesets/java/clone.xml"/> |
| 50 | <rule ref="rulesets/java/strictexception.xml"/> |
| 51 | <rule ref="rulesets/java/design.xml"> |
| 52 | <exclude name="GodClass" /> |
| 53 | </rule> |
| 54 | <rule ref="rulesets/java/coupling.xml"> |
| 55 | <exclude name="LawOfDemeter" /> |
| 56 | <exclude name="ExcessiveImports" /> |
Yuta HIGUCHI | e28831a | 2014-03-24 17:17:48 -0700 | [diff] [blame] | 57 | <!-- Suppress Removed misconfigured rule warning --> |
| 58 | <exclude name="LoosePackageCoupling" /> |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 59 | </rule> |
Yuta HIGUCHI | e28831a | 2014-03-24 17:17:48 -0700 | [diff] [blame] | 60 | </ruleset> |
| 61 | |