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" /> |
Ray Milkey | 9289721 | 2014-07-21 10:33:16 -0700 | [diff] [blame] | 38 | <exclude name="ShortClassName" /> |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 39 | <exclude name="ShortMethodName" /> |
| 40 | <exclude name="ShortVariable" /> |
| 41 | <exclude name="LongVariable" /> |
| 42 | </rule> |
Ray Milkey | ec49771 | 2014-03-20 17:51:22 -0700 | [diff] [blame] | 43 | <rule ref="rulesets/java/naming.xml/VariableNamingConventions"> |
| 44 | <properties> |
| 45 | <!-- ONOS allows the name "log" for static final Loggers --> |
| 46 | <property name="violationSuppressRegex" value=".*'log'.*"/> |
| 47 | </properties> |
| 48 | </rule> |
| 49 | |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 50 | <rule ref="rulesets/java/clone.xml"/> |
| 51 | <rule ref="rulesets/java/strictexception.xml"/> |
| 52 | <rule ref="rulesets/java/design.xml"> |
| 53 | <exclude name="GodClass" /> |
| 54 | </rule> |
| 55 | <rule ref="rulesets/java/coupling.xml"> |
| 56 | <exclude name="LawOfDemeter" /> |
| 57 | <exclude name="ExcessiveImports" /> |
Yuta HIGUCHI | e28831a | 2014-03-24 17:17:48 -0700 | [diff] [blame] | 58 | <!-- Suppress Removed misconfigured rule warning --> |
| 59 | <exclude name="LoosePackageCoupling" /> |
Ray Milkey | 70d91cc | 2014-03-18 15:22:27 -0700 | [diff] [blame] | 60 | </rule> |
Yuta HIGUCHI | e28831a | 2014-03-24 17:17:48 -0700 | [diff] [blame] | 61 | </ruleset> |
| 62 | |