blob: dc65492d2e84d42777810536e3db3e57ef7e3763 [file] [log] [blame]
<?xml version="1.0"?>
<ruleset name="buck"
<description>Rules for the Buck project.</description>
for ruleset definitions. Note that Buck is currently built with PMD 5.0.3.
<rule ref="rulesets/java/basic.xml" />
<rule ref="rulesets/java/empty.xml" />
<rule ref="rulesets/java/imports.xml">
Excluded because tests that use both JUnit and EasyMock tend to
statically import many methods, which we allow.
<exclude name="TooManyStaticImports" />
<rule ref="rulesets/java/junit.xml">
<!-- This is not practical. -->
<exclude name="JUnitAssertionsShouldIncludeMessage" />
<!-- Unclear what an appropriate upper bound would be. -->
<exclude name="JUnitTestContainsTooManyAsserts" />
Not practical: pure EasyMock tests or tests that exclusively assert
using MoreAsserts.* should not need to be annotated with this.
<exclude name="JUnitTestsShouldIncludeAssert" />
<rule ref="rulesets/java/unusedcode.xml">
Including the public keyword in interface methods is acceptable: this
makes it easier to copy/paste them.
<exclude name="UnusedModifier" />
<rule ref="rulesets/java/optimizations.xml">
<exclude name="AvoidInstantiatingObjectsInLoops" />
<exclude name="LocalVariableCouldBeFinal" />
<exclude name="MethodArgumentCouldBeFinal" />
<exclude name="RedundantFieldInitializer" />
<exclude name="UseStringBufferForStringAppends" />