1<?xml version="1.0" encoding="UTF-8"?> 2<ruleset name="Custom ruleset for OpenGrok" 3 xmlns="http://pmd.sf.net/ruleset/1.0.0" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" 6 xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> 7 8 <description> 9 Settings for PMD, tuned for the OpenGrok project. 10 </description> 11 12 <rule ref="rulesets/java/strings.xml"/> 13 <rule ref="rulesets/java/basic.xml"/> 14 <rule ref="rulesets/java/braces.xml"/> 15 <rule ref="rulesets/java/clone.xml"/> 16 <rule ref="rulesets/java/design.xml"/> 17 <rule ref="rulesets/java/finalizers.xml"/> 18 <rule ref="rulesets/java/imports.xml"/> 19 <rule ref="rulesets/java/junit.xml"> 20<!-- enable bellow to push people to write asserts which are easier to understand --> 21 <exclude name="JUnitAssertionsShouldIncludeMessage"/> 22 </rule> 23 <rule ref="rulesets/java/logging-java.xml"/> 24 <rule ref="rulesets/java/migrating.xml"/> 25 <rule ref="rulesets/java/optimizations.xml"> 26 <exclude name="AvoidInstantiatingObjectsInLoops"/> 27 <!-- Enable the following when we have fever reported warnings --> 28 <exclude name="LocalVariableCouldBeFinal"/> 29 <exclude name="MethodArgumentCouldBeFinal"/> 30 </rule> 31 <rule ref="rulesets/java/strictexception.xml"/> 32 <rule ref="rulesets/java/strings.xml"/> 33 <rule ref="rulesets/java/sunsecure.xml"/> 34 <rule ref="rulesets/java/typeresolution.xml"> 35<!-- <properties> 36 <property name="IgnoreJUnitCompletely" value="true"/> 37 </properties> --> 38 </rule> 39 <rule ref="rulesets/java/unusedcode.xml"/> 40 <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID"/> 41 42</ruleset> 43