<?xml version="1.0"?>

<ruleset name="Unused Code Rules" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../etc/ruleset_xml_schema.xml">
  <description>
The Unused Code Ruleset contains a collection of rules that find unused code.
  </description>

  <rule name="UnusedPrivateField"
        message="Avoid unused private fields such as ''{0}''"
        class="net.sourceforge.pmd.rules.UnusedPrivateFieldRule"
        externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedPrivateField">
    <description>
Detects when a private field is declared and/or assigned a value, but not used.
    </description>
      <priority>3</priority>
    <example>
<![CDATA[
public class Something {
  private static int FOO = 2; // Unused
  private int i = 5; // Unused
  private int j = 6;
  public int addOne() {
    return j++;
  }
}
]]>
    </example>
  </rule>

<rule name="UnusedLocalVariable"
        message="Avoid unused local variables such as ''{0}''"
        class="net.sourceforge.pmd.rules.UnusedLocalVariableRule"
        externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedLocalVariable">
    <description>
Detects when a local variable is declared and/or assigned, but not used.
    </description>
    <priority>3</priority>

    <example>
<![CDATA[
public class Foo {
 public void doSomething() {
  int i = 5; // Unused
 }
}
]]>
    </example>
  </rule>

    <rule name="UnusedPrivateMethod"
        message="Avoid unused private methods such as ''{0}''"
        class="net.sourceforge.pmd.rules.UnusedPrivateMethodRule"
        externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedPrivateMethod">
    <description>
Unused Private Method detects when a private method is declared but is unused.
    </description>
        <priority>3</priority>
    <example>
<![CDATA[
public class Something {
 private void foo() {} // unused
}
]]>
    </example>
  </rule>


  <rule name="UnusedFormalParameter"
        message="Avoid unused {0} parameters such as ''{1}''"
        class="net.sourceforge.pmd.rules.UnusedFormalParameterRule"
        externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedFormalParameter">
    <description>
Avoid passing parameters to methods or constructors and then not using those parameters.
    </description>
      <priority>3</priority>

    <example>
<![CDATA[
public class Foo {
 private void bar(String howdy) {
  // howdy is not used
 }
]]>
    </example>
  </rule>

</ruleset>