Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
Table of Contents

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.velocity.rule.errorprone.EmptyForeachStmtRule

Use this rule by referencing it:

<rule ref="category/velocity/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.velocity.rule.errorprone.EmptyIfStmtRule

Use this rule by referencing it:

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