forked from hitherejoe/Android-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 918
/
pmd-ruleset.xml
40 lines (37 loc) · 1.7 KB
/
pmd-ruleset.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0"?>
<ruleset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" name="Android Application Rules"
xmlns="https://pmd.sf.net/ruleset/1.0.0"
xsi:noNamespaceSchemaLocation="https://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:schemaLocation="https://pmd.sf.net/ruleset/1.0.0 https://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Custom ruleset for ribot Android application</description>
<exclude-pattern>.*/R.java</exclude-pattern>
<exclude-pattern>.*/gen/.*</exclude-pattern>
<rule ref="rulesets/java/android.xml" />
<rule ref="rulesets/java/clone.xml" />
<rule ref="rulesets/java/finalizers.xml" />
<rule ref="rulesets/java/imports.xml">
<!-- Espresso is designed this way !-->
<exclude name="TooManyStaticImports" />
</rule>
<rule ref="rulesets/java/logging-java.xml">
<!-- This rule wasn't working properly and given errors in every var call info -->
<exclude name="GuardLogStatementJavaUtil" />
</rule>
<rule ref="rulesets/java/braces.xml">
<!-- We allow single line if's without braces -->
<exclude name="IfStmtsMustUseBraces" />
</rule>
<rule ref="rulesets/java/strings.xml" >
<!-- Exclude because causes problems with SQL Strings that usually require duplication -->
<exclude name="AvoidDuplicateLiterals"/>
</rule>
<rule ref="rulesets/java/basic.xml" />
<rule ref="rulesets/java/naming.xml">
<exclude name="AbstractNaming" />
<exclude name="LongVariable" />
<exclude name="ShortMethodName" />
<exclude name="ShortVariable" />
<exclude name="ShortClassName" />
<exclude name="VariableNamingConventions" />
</rule>
</ruleset>