- 1 - Introduction
- 1.1 What is PMD?
- 1.2 A short history
- 1.3 About this book
- 1.4 Some acknowledgements
- 2 - Installation and basic operation
- 2.1 Initial set up
- 2.2 Running PMD
- 2.3 Report formats
- 2.4 Useful parameters
- 2.5 Rules and rulesets
- 3 - PMD, Ant, and Maven
- 3.1 Overview of Ant
- 3.2 Basic PMD Ant task usage
- 3.3 PMD's Ant task at work
- 3.4 More Ant task options
- 3.5 Maven and Ant
- 4 - Integrated Development Environment plugins
- 4.1 Introduction
- 4.1.1 External tool integrations
- 4.1.2 Embedded plugin integration
- 4.2 Eclipse
- 4.3 NetBeans/Sun Java Studio Enterprise/Creator
- 4.4 Oracle JDeveloper
- 4.5 IntelliJ IDEA
- 4.6 jEdit
- 4.7 Borland JBuilder
- 4.8 TextPad
- 4.9 Xinox JCreator
- 4.10 Omnicore CodeGuide
- 5 - Detecting duplicate code
- 5.1 Duplicated code is bad
- 5.2 Finding duplicated code
- 5.3 Running CPD from the command line
- 5.4 Running CPD from the GUI
- 5.5 Running CPD from an Ant build file
- 5.6 CPD internals
- 6 - Best practices
- 6.1 Start with a small subset of rules
- 6.2 Be aware of your team's likes and dislikes
- 6.3 Start with rules less prone to false positives
- 6.4 Use NOPMD to block false positives
- 6.5 Use a PMD plug-in for your IDE
- 6.6 Pass along feedback to the PMD team
- 7 - Writing PMD rules
- 7.1 Building custom rulesets
- 7.2 Writing your own rules
- 7.3 Rules in XPath
- 7.4 Rules in Java
- 7.5 Using pluggable warning messages
- 7.6 Embedding XPath in Java rules
- 7.7 More rules in Java - using the symbol table
- 8 - Customizing PMD
- 8.1 Compiling PMD source code
- 8.2 Creating your own report format
- 8.3 A new language for CPD
- 8.4 Adding a custom ruleset short name
- 8.5 Contributing to PMD
- 9 - PMD internals
- 9.1 Compiler concepts
- 9.2 The grammar - JavaCC and JJTree
- 9.3 Building the symbol table
- 9.4 Data flow analysis
- 9.5 XPath integration
- 10 - Similar open source tools
- 10.1 Source code analyzers
- 10.1.1 Checkstyle
- 10.1.2 Java Coding Standard Checker (JCSC)
- 10.1.3 DoctorJ
- 10.1.4 Hammurapi
- 10.2 Bytecode analyzers
- 10.2.1 FindBugs
- 10.2.2 Jlint
- Appendix - Rules and rule notes
- Bibliography
- Index
|
|