tom | 50a76dd | 2014-09-02 15:18:35 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
alshabib | ab98466 | 2014-12-04 18:56:18 -0800 | [diff] [blame] | 2 | <!-- |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 3 | ~ Copyright 2014-present Open Networking Laboratory |
alshabib | ab98466 | 2014-12-04 18:56:18 -0800 | [diff] [blame] | 4 | ~ |
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ~ you may not use this file except in compliance with the License. |
| 7 | ~ You may obtain a copy of the License at |
| 8 | ~ |
| 9 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | ~ |
| 11 | ~ Unless required by applicable law or agreed to in writing, software |
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ~ See the License for the specific language governing permissions and |
| 15 | ~ limitations under the License. |
| 16 | --> |
tom | 50a76dd | 2014-09-02 15:18:35 -0700 | [diff] [blame] | 17 | <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 18 | name="ONOS Rules" |
| 19 | xmlns="http://pmd.sf.net/ruleset/1.0.0" |
| 20 | xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" |
| 21 | xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" > |
| 22 | |
| 23 | <description>ONOS PMD rules</description> |
| 24 | |
| 25 | <rule ref="rulesets/java/unnecessary.xml" > |
| 26 | <exclude name="UselessParentheses" /> |
| 27 | </rule> |
| 28 | <rule ref="rulesets/java/basic.xml"> |
| 29 | <exclude name="EmptyCatchBlock"/> |
| 30 | </rule> |
| 31 | <rule ref="rulesets/java/basic.xml/EmptyCatchBlock"> |
| 32 | <properties> |
| 33 | <property name="allowCommentedBlocks" value="true"/> |
| 34 | </properties> |
| 35 | </rule> |
| 36 | <rule ref="rulesets/java/unusedcode.xml"> |
| 37 | <!-- Explicit public keyword in interface methods is acceptable --> |
| 38 | <exclude name="UnusedModifier" /> |
| 39 | </rule> |
| 40 | <rule ref="rulesets/java/imports.xml"/> |
| 41 | <rule ref="rulesets/java/optimizations.xml"> |
| 42 | <exclude name="LocalVariableCouldBeFinal" /> |
| 43 | <exclude name="MethodArgumentCouldBeFinal" /> |
| 44 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 45 | </rule> |
| 46 | |
| 47 | <rule ref="rulesets/java/strings.xml"> |
| 48 | <exclude name="AvoidDuplicateLiterals" /> |
| 49 | </rule> |
| 50 | <rule ref="rulesets/java/braces.xml"/> |
| 51 | <rule ref="rulesets/java/naming.xml"> |
| 52 | <exclude name="AvoidInstantiatingObjectsInLoops" /> |
| 53 | <exclude name="ShortClassName" /> |
| 54 | <exclude name="ShortMethodName" /> |
| 55 | <exclude name="ShortVariable" /> |
| 56 | <exclude name="LongVariable" /> |
| 57 | </rule> |
| 58 | <rule ref="rulesets/java/naming.xml/VariableNamingConventions"> |
| 59 | <properties> |
| 60 | <!-- ONOS allows the name "log" for static final Loggers --> |
| 61 | <property name="violationSuppressRegex" value=".*'log'.*"/> |
| 62 | </properties> |
| 63 | </rule> |
| 64 | |
| 65 | <rule ref="rulesets/java/clone.xml"/> |
| 66 | <rule ref="rulesets/java/strictexception.xml"/> |
| 67 | <rule ref="rulesets/java/design.xml"> |
| 68 | <exclude name="GodClass" /> |
| 69 | </rule> |
| 70 | <rule ref="rulesets/java/coupling.xml"> |
| 71 | <exclude name="LawOfDemeter" /> |
| 72 | <exclude name="ExcessiveImports" /> |
| 73 | <!-- Suppress Removed misconfigured rule warning --> |
| 74 | <exclude name="LoosePackageCoupling" /> |
| 75 | </rule> |
| 76 | </ruleset> |
| 77 | |