blob: 1a1fae0871a8198665ae5c3ac81f3ee5262464b2 [file] [log] [blame]
Ray Milkey70d91cc2014-03-18 15:22:27 -07001<?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 HIGUCHIe28831a2014-03-24 17:17:48 -070021 <rule ref="rulesets/java/unusedcode.xml">
22 <!-- Explicit public keyword in interface methods is acceptable -->
23 <exclude name="UnusedModifier" />
24 </rule>
Ray Milkey70d91cc2014-03-18 15:22:27 -070025 <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 Milkeyec497712014-03-20 17:51:22 -070042 <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 Milkey70d91cc2014-03-18 15:22:27 -070049 <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 HIGUCHIe28831a2014-03-24 17:17:48 -070057 <!-- Suppress Removed misconfigured rule warning -->
58 <exclude name="LoosePackageCoupling" />
Ray Milkey70d91cc2014-03-18 15:22:27 -070059 </rule>
Yuta HIGUCHIe28831a2014-03-24 17:17:48 -070060</ruleset>
61