forked from phoedos/pmd
2.4 KiB
2.4 KiB
title | keywords | tags | permalink | toc | summary | last_updated | |
---|---|---|---|---|---|---|---|
PMD Introduction | java |
|
index.html | false | Welcome to PMD, an extensible cross-language static code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code. | August 2017 |
{% include image.html file="pmd-logo-big.png" alt="PMD Logo" %}
PMD scans source code in Java and other languages and looks for potential problems like:
- Possible bugs - empty try/catch/finally/switch statements
- Dead code - unused local variables, parameters and private methods
- Suboptimal code - wasteful String/StringBuffer usage
- Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
CPD, the copy-pase-detector, finds duplicated code in many languages:
- Duplicate code is often just copied and pasted. This means, the bugs are also copied and pasted. Fixing them means, fix all duplicated code locations.
Features
{::options parse_block_html="true" /}
### PMD
Features:
- Supporting 8 languages
- Many ready-to-use built-in rules.
- Custom rules can be written in Java
- Custom rules can be written using XPath expression that query the AST of the sources
- Many output formats
- Many integrations into IDEs, build tools
Supported Languages:
### CPD
Features:
- Supporting 19 languages
- Simple GUI
- Fast
- Many integrations
Supported Languages:
- Java
- C, C++
- C#
- Groovy
- PHP
- Ruby
- Fortran
- JavaScript
- PLSQL
- Apache Velocity
- Scala
- Objective C
- Matlab
- Python
- Go
- Swift
- Salesforce.com Apex and Visualforce
Download PMD {{ site.pmd.version }}
Latest Version: {{ site.pmd.version }} ({{ site.pmd.date }})
{% include links.html %}