forked from phoedos/pmd
4cc6862d8c
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4166 51baf565-9d33-0410-a72c-fc3788e3496d
70 lines
2.1 KiB
Plaintext
70 lines
2.1 KiB
Plaintext
PMD for NetBeans.
|
|
|
|
------------------------
|
|
INSTALL
|
|
------------------------
|
|
|
|
1) Start NetBeans
|
|
2) Goto Tools --> Module Manager
|
|
3) Press Update
|
|
4) Choose "Install Manually Downloaded Modules (.nbm Files).".
|
|
5) Press Next
|
|
6) Choose Add
|
|
7) Goto the directory where you downloaded pmd-netbeans and choose the file "pmd.nbm".
|
|
8) Press OK
|
|
9) Press Next
|
|
10) Press Next
|
|
11) Press Accept
|
|
12) Choose Include and confirm to install an usined module
|
|
13) Press Finish
|
|
|
|
------------------------
|
|
USE
|
|
------------------------
|
|
|
|
Right click on one or more folders or Java files, choose Tools -> PMD and watch the tool
|
|
find your flaws. The tool is also located under the global Tools menu. Double
|
|
click on the error messages in the output pane to go to the line in the
|
|
Java source file to correct the problem PMD discovered.
|
|
|
|
XXXXXXXXXXXXXXXXXXXXXXXX
|
|
X OPTIONS X
|
|
XXXXXXXXXXXXXXXXXXXXXXXX
|
|
|
|
------------------------
|
|
RULES
|
|
------------------------
|
|
1) Start NetBeans
|
|
2) Goto Tools --> Options
|
|
3) Navigate to Miscelaneous section and expand PMD node
|
|
4) Click on "Rules"
|
|
5) Click on the [...] button
|
|
6) Select the different rules to see information and examples of the rule
|
|
7) Use the <, <<, >, >>, buttons to choose which rules to use.
|
|
8) Press OK to save the configuration
|
|
|
|
------------------------
|
|
CUSTOM RULESETS
|
|
------------------------
|
|
1) Start NetBeans
|
|
2) Goto Tools --> Options
|
|
3) Navigate to Miscelaneous section and expand PMD node
|
|
5) Click on "Rulesets"
|
|
6) Click "Add RuleSet" to locate the ruleset xml file you want to include
|
|
7) Click "Add Rule jar" to locate the jar containing the rules
|
|
8) Check "Include PMD standard rules" to include the rules from the pmd distribution
|
|
9) Press OK to save the configuration
|
|
10) Go to Rules to select the new rules.
|
|
|
|
------------------------
|
|
REALTIME SCANNING
|
|
------------------------
|
|
1) Start NetBeans
|
|
2) Goto Tools --> Options
|
|
3) Navigate to Miscelaneous section and expand PMD node
|
|
4) Click on "Enable scan"
|
|
5) Choose true to enable scan, false otherwise.
|
|
6) Click on "Scan interval"
|
|
7) Enter the number of seconds between each scan
|
|
XX) NetBeans requires a restart to disable scanning
|