<?xml version="1.0"?>
<ruleset name="Nazgul Tools PMD Rules"
         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">

    <description>Cobertura PMD rules</description>

    <!--
        Rule priority definitions:

        1: Change absolutely required. Behavior is critically broken/buggy.
        2: Change highly recommended. Behavior is quite likely to be broken/buggy.
        3: Change recommended. Behavior is confusing, perhaps buggy, and/or against standards/best practices.
        4: Change optional. Behavior is not likely to be buggy, but more just flies in the face of standards/style/good taste.
        5: Change highly optional. Nice to have, such as a consistent naming policy for package/class/fields...
    -->

    <rule ref="rulesets/java/basic.xml"/>
    <rule ref="rulesets/java/unusedcode.xml"/>

    <!--
        Class design checks.
    -->
    <rule ref="rulesets/java/design.xml/CloseResource">
        <priority>3</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod">
        <priority>3</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/EqualsNull">
        <priority>2</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic">
        <priority>2</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/IdempotentOperations">
        <priority>2</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/InstantiationToGetClass">
        <priority>3</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass">
        <priority>2</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/PreserveStackTrace">
        <priority>3</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/SingularField">
        <priority>4</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/SimplifyConditional">
        <priority>3</priority>
    </rule>
    <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn">
        <priority>3</priority>
    </rule>
</ruleset>
