<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Android Application Rules"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">

    <description>Custom ruleset for Android application</description>

    <exclude-pattern>.*/R.java</exclude-pattern>
    <exclude-pattern>.*/gen/.*</exclude-pattern>

    <rule ref="rulesets/java/coupling.xml">
        <exclude name="LawOfDemeter"/>
    </rule>
    <rule ref="rulesets/java/design.xml">
        <exclude name="AccessorClassGeneration"/>
        <exclude name="ConfusingTernary"/>
        <exclude name="TooFewBranchesForASwitchStatement"/>
        <exclude name="FieldDeclarationsShouldBeAtStartOfClass"/>
        <exclude name="ReturnEmptyArrayRatherThanNull"/>
    </rule>
    <rule ref="rulesets/java/empty.xml"/>
    <rule ref="rulesets/java/naming.xml">
        <exclude name="ShortVariable"/>
        <exclude name="AvoidFieldNameMatchingTypeName"/>
        <exclude name="AvoidFieldNameMatchingMethodName"/>
        <exclude name="LongVariable"/>
        <exclude name="AbstractNaming"/>
        <exclude name="ShortClassName"/>
    </rule>
    <rule ref="rulesets/java/junit.xml">
        <exclude name="UseAssertTrueInsteadOfAssertEquals"/>
        <exclude name="JUnitTestsShouldIncludeAssert"/>
        <exclude name="JUnitAssertionsShouldIncludeMessage"/>
        <exclude name="JUnitTestContainsTooManyAsserts"/>
    </rule>
    <rule ref="rulesets/java/migrating.xml"/>
    <rule ref="rulesets/java/strictexception.xml"/>
    <rule ref="rulesets/java/unnecessary.xml">
        <exclude name="UselessParentheses"/>
    </rule>
    <rule ref="rulesets/java/unusedcode.xml"/>
    <rule ref="rulesets/java/optimizations.xml">
        <exclude name="AvoidInstantiatingObjectsInLoops"/>
    </rule>
    <rule ref="rulesets/java/typeresolution.xml"/>
    <rule ref="rulesets/java/android.xml"/>
    <rule ref="rulesets/java/clone.xml"/>
    <rule ref="rulesets/java/finalizers.xml"/>
    <rule ref="rulesets/java/imports.xml">
        <exclude name="TooManyStaticImports"/>
    </rule>
    <rule ref="rulesets/java/logging-java.xml"/>
    <rule ref="rulesets/java/braces.xml"/>
    <rule ref="rulesets/java/sunsecure.xml"/>
    <rule ref="rulesets/java/strings.xml"/>
    <rule ref="rulesets/java/basic.xml"/>

</ruleset>