PMD source code analyzer
pmd.github.io
PMD source code analyzer
1–10 of 36 posts
Re: PMD source code analyzer
#2In fact, the lead dev wrote a book "PMD Applied" and I wrote a review of it: http://caseysoftware.com/blog/book-review-pmd-applied
It's since been implemented in PHP too: https://phpmd.org/
Re: PMD source code analyzer
#3"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
- Duplicate code - copied/pasted code means copied/pasted bugs"
Re: PMD source code analyzer
#4Re: PMD source code analyzer
#5Re: PMD source code analyzer
#6Re: PMD source code analyzer
#7Re: PMD source code analyzer
#8Re: PMD source code analyzer
#9Here's a shameless plug for https://coala.io/ which is a sort of a meta-linter — coala can run PMD on your code along with ~100 other linters and code checkers.
Re: PMD source code analyzer
#10Wow, crazy to see this project still alive and thriving. I was using it 10+ years ago when I worked exclusively in Java. It was great to find those "obvious" issues that slip in that you didn't notice when you should of. I think I had it as a SVN pre-commit hook at one point. In fact, the lead dev wrote a book "PMD Applied" and I wrote a review of it: http://caseysoftware.com/blog/book-review-pmd-applied It's since b…