1 | <?xml version="1.0"?>
|
---|
2 | <ruleset name="JOSM ruleset"
|
---|
3 | xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
---|
4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
---|
5 | xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
|
---|
6 |
|
---|
7 | <description>JOSM PMD ruleset</description>
|
---|
8 |
|
---|
9 | <!-- <rule ref="rulesets/java/basic.xml"/>
|
---|
10 | <rule ref="rulesets/java/braces.xml"/>
|
---|
11 | <rule ref="rulesets/java/clone.xml"/>
|
---|
12 | <rule ref="rulesets/java/codesize.xml"/>
|
---|
13 | <rule ref="rulesets/java/comments.xml"/>
|
---|
14 | <rule ref="rulesets/java/design.xml"/>
|
---|
15 | <rule ref="rulesets/java/empty.xml"/>
|
---|
16 | <rule ref="rulesets/java/finalizers.xml"/>
|
---|
17 | <rule ref="rulesets/java/imports.xml"/>
|
---|
18 | <rule ref="rulesets/java/migrating.xml"/>-->
|
---|
19 | <rule ref="rulesets/java/naming.xml">
|
---|
20 | <exclude name="AbstractNaming"/>
|
---|
21 | <exclude name="AvoidFieldNameMatchingMethodName"/>
|
---|
22 | <exclude name="AvoidFieldNameMatchingTypeName"/>
|
---|
23 | <exclude name="BooleanGetMethodName"/>
|
---|
24 | <exclude name="LongVariable"/>
|
---|
25 | <exclude name="ShortClassName"/>
|
---|
26 | <exclude name="ShortMethodName"/>
|
---|
27 | <exclude name="ShortVariable"/>
|
---|
28 | <exclude name="MethodNamingConventions"/>
|
---|
29 | <exclude name="VariableNamingConventions"/>
|
---|
30 | </rule>
|
---|
31 | <rule ref="rulesets/java/naming.xml/ShortMethodName">
|
---|
32 | <properties>
|
---|
33 | <property name="violationSuppressXPath" value="//MethodDeclarator[@Image='at' or @Image='ht' or @Image='of' or @Image='ok' or @Image='tr']
|
---|
34 | | //MethodDeclarator/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated']
|
---|
35 | | //MethodDeclarator/../../../..[@Image='LambertConformalConic']"/>
|
---|
36 | </properties>
|
---|
37 | </rule>
|
---|
38 | <rule ref="rulesets/java/naming.xml/MethodNamingConventions">
|
---|
39 | <properties>
|
---|
40 | <property name="violationSuppressXPath" value="//MethodDeclarator/../../../..[@Image='Functions' or @Image='PseudoClasses' or @Image='Role' or @Image='TaggingPreset']"/>
|
---|
41 | </properties>
|
---|
42 | </rule>
|
---|
43 | <rule ref="rulesets/java/naming.xml/VariableNamingConventions">
|
---|
44 | <properties>
|
---|
45 | <property name="violationSuppressXPath" value="//FieldDeclaration[@Public='true']|//FieldDeclaration/../Annotation/MarkerAnnotation/Name[@Image='pref']"/>
|
---|
46 | </properties>
|
---|
47 | </rule>
|
---|
48 | <rule ref="rulesets/java/naming.xml/LongVariable">
|
---|
49 | <properties>
|
---|
50 | <property name="minimum" value="44"/>
|
---|
51 | </properties>
|
---|
52 | </rule>
|
---|
53 | <rule ref="rulesets/java/optimizations.xml">
|
---|
54 | <exclude name="LocalVariableCouldBeFinal"/>
|
---|
55 | <exclude name="MethodArgumentCouldBeFinal"/>
|
---|
56 | <exclude name="AvoidInstantiatingObjectsInLoops"/>
|
---|
57 | <exclude name="PrematureDeclaration"/>
|
---|
58 | <exclude name="SimplifyStartsWith"/>
|
---|
59 | <exclude name="UseStringBufferForStringAppends"/>
|
---|
60 | <exclude name="UseArrayListInsteadOfVector"/>
|
---|
61 | </rule>
|
---|
62 | <rule ref="rulesets/java/strictexception.xml">
|
---|
63 | <exclude name="ExceptionAsFlowControl"/>
|
---|
64 | <exclude name="AvoidCatchingGenericException"/>
|
---|
65 | <exclude name="AvoidRethrowingException"/>
|
---|
66 | </rule>
|
---|
67 | <rule ref="rulesets/java/strings.xml">
|
---|
68 | <exclude name="AvoidDuplicateLiterals"/>
|
---|
69 | <exclude name="ConsecutiveLiteralAppends"/>
|
---|
70 | <exclude name="AvoidStringBufferField"/>
|
---|
71 | <exclude name="StringToString"/>
|
---|
72 | <exclude name="UselessStringValueOf"/>
|
---|
73 | <exclude name="InefficientEmptyStringCheck"/>
|
---|
74 | </rule>
|
---|
75 | <rule ref="rulesets/java/typeresolution.xml">
|
---|
76 | <exclude name="LooseCoupling"/>
|
---|
77 | <exclude name="SignatureDeclareThrowsException"/>
|
---|
78 | </rule>
|
---|
79 | <rule ref="rulesets/java/typeresolution.xml/SignatureDeclareThrowsException">
|
---|
80 | <properties>
|
---|
81 | <property name="violationSuppressXPath" value="//MethodDeclaration/../Annotation/MarkerAnnotation/Name[@Image='Override']"/>
|
---|
82 | <property name="IgnoreJUnitCompletely" value="true"/>
|
---|
83 | </properties>
|
---|
84 | </rule>
|
---|
85 | <rule ref="rulesets/java/unnecessary.xml">
|
---|
86 | <exclude name="UselessParentheses"/>
|
---|
87 | <exclude name="UselessOverridingMethod"/>
|
---|
88 | </rule>
|
---|
89 | <rule ref="rulesets/java/unusedcode.xml">
|
---|
90 | <exclude name="UnusedFormalParameter"/>
|
---|
91 | </rule>
|
---|
92 | <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter">
|
---|
93 | <properties>
|
---|
94 | <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@Image='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/>
|
---|
95 | </properties>
|
---|
96 | </rule>
|
---|
97 |
|
---|
98 | </ruleset>
|
---|