From 40c4d343d8927fbc3d531606726e27abc5e9ab06 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Mon, 23 Jun 2003 18:34:45 +0000 Subject: [PATCH] Started the 'best practices' doc git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2019 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/xdocs/bestpractices.xml | 36 ++++++++++++++++++++++++++++++++++++ pmd/xdocs/navigation.xml | 1 + 2 files changed, 37 insertions(+) create mode 100644 pmd/xdocs/bestpractices.xml diff --git a/pmd/xdocs/bestpractices.xml b/pmd/xdocs/bestpractices.xml new file mode 100644 index 0000000000..91ea3170ac --- /dev/null +++ b/pmd/xdocs/bestpractices.xml @@ -0,0 +1,36 @@ + + + + + Tom Copeland + Best Practices + + + +
+ +

Running every ruleset will result in a huge number of rule violations, most of which will be unimportant. + Having to sort through a thousand line report to find the few you're really interested in takes + all the fun out of things.

+

Instead, start with some of the obvious rulesets - just run unusedcode + and fix any unused locals and fields. + Then, run basic and fix all the empty if statements and such-like. + Then peruse the design and + controversial rulesets and use the ones + you like via a custom ruleset.

+
+ +

TODO - generally, pick the ones you like, and ignore the warnings you don't like. It's just a tool.

+
+ +

Using PMD within your IDE is much more enjoyable than flipping back and forth + between an HTML report and your IDE. Most IDE plugins have the "click on the rule + violation and jump to that line of code" feature. Find the PMD plugin for your IDE, install it, + and soon you'll be fixing problems much faster.

+
+

Suggestions? Comments? Post them here. Thanks!

+
+ +
+ + diff --git a/pmd/xdocs/navigation.xml b/pmd/xdocs/navigation.xml index 9ac7cd2681..13285bc568 100644 --- a/pmd/xdocs/navigation.xml +++ b/pmd/xdocs/navigation.xml @@ -20,6 +20,7 @@ +