Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
Edit me

EmptyForeachStmt

Since: PMD 5.1

Priority: Medium High (2)

Empty foreach statements should be deleted.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.vm.rule.errorprone.EmptyForeachStmtRule

Use this rule by referencing it:

<rule ref="category/vm/errorprone.xml/EmptyForeachStmt" />

EmptyIfStmt

Since: PMD 5.1

Priority: Medium High (2)

Empty if statements should be deleted.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.vm.rule.errorprone.EmptyIfStmtRule

Use this rule by referencing it:

<rule ref="category/vm/errorprone.xml/EmptyIfStmt" />