diff --git a/pmd/test-data/RuleSetReadWriteTest.xml b/pmd/test-data/RuleSetReadWriteTest.xml new file mode 100644 index 0000000000..0112b94d85 --- /dev/null +++ b/pmd/test-data/RuleSetReadWriteTest.xml @@ -0,0 +1,221 @@ + + + + +The Basic Ruleset contains a collection of good practice rules +which everyone should follow. + + + + + +Empty Catch Block finds instances where an exception is caught, +but nothing is done. In most circumstances, this swallows an exception +which should either be acted on or reported. + + + + + + + + + +Empty If Statement finds instances where a condition is checked but nothing is done about it. + + + + + + + + +Empty While Statement finds all instances where a while statement +does nothing. If it is a timing loop, then you should use Thread.sleep() for it; if +it's a while loop that does a lot in the exit expression, rewrite it to make it clearer. + + + + + + + + + + Avoid using if..else statements without using curly braces + + + + + + + + + + Avoid unnecessary temporaries when converting primitives to Strings + + + + + + + + + +Override both public boolean Object.equals(Object other), and public int Object.hashCode(), or override neither. Even if you are inheriting a hashCode() from a parent class, consider implementing hashCode and explicitly delegating to your superclass. + + + + + + + + + +Avoid empty try blocks - what's the point? + + + + + + + + + +Avoid empty finally blocks - these can be deleted. + + + + + + + + + + Avoid using 'while' statements without using curly braces + + + + + + + + + + Avoid using 'for' statements without using curly braces + + + + + + + + + + +