Created
April 29, 2011 15:06
-
-
Save fredgrott/948433 to your computer and use it in GitHub Desktop.
eclipse pmd ruleset for andorid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="Android Application Rules" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description>Ruleset for Android application</description> | |
<exclude-pattern>.*/R.java</exclude-pattern> | |
<exclude-pattern>.*/gen/.*</exclude-pattern> | |
<rule ref="rulesets/android.xml"/> | |
<rule name="DoNotHardCodeSDCard" | |
message="Do not hardcode /sdcard." | |
class="net.sourceforge.pmd.rules.XPathRule"> | |
<description>Use Environment.getExternalStorageDirectory() instead of "/sdcard"</description> | |
<priority>3</priority> | |
<properties> | |
<property name="xpath"> | |
<value>//Literal[starts-with(@Image,'"/sdcard')]</value> | |
</property> | |
</properties> | |
</rule> | |
<rule ref="rulesets/clone.xml"/> | |
<rule ref="rulesets/finalizers.xml"/> | |
<rule ref="rulesets/imports.xml"/> | |
<rule ref="rulesets/logging-java.xml"/> | |
<rule ref="rulesets/naming.xml"> | |
<exclude name="AbstractNaming"/> | |
<exclude name="LongVariable"/> | |
<exclude name="LongMethodName"/> | |
<exclude name="ShortMethodName"/> | |
<exclude name="ShortVariable"/> | |
<exclude name="VariableNamingConventions"/> | |
</rule> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment