PMD source code analyzer
pmd.github.io
pmd.github.io
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 been implemented in PHP too: https://phpmd.org/
With coala you need to configure which linters run on which files, and we recognize this as a thing we can improve upon. We're soon going to ship a feature which will allow configuration to just specify where the files are (e.g. 'src/*.py') and what aspects to check (e.g. 'syntax,smells,duplication,security'). Then coala will decide which tools are appropriate, get them from pip/npm/wherever, and run them.
Drat, I liked the name "Red Herring".
https://anonscm.debian.org/cgit/collab-maint/check-all-the-t...
And if that's not enough, you can also output as JSON.
Edit: and this applies to all linters - native and external.
We don't have support for SHA-1 sums for example, but these could be added very easily.
I've created an issue to support this in coala: https://github.com/coala/coala/issues/3525
Thanks!
You could take a look at the list of bears we support[1] (a bear is basically a plugin) though.
You can use just that bear:
[Commit]
bears = GitCommitBear
shortlog_trailing_period = False # disallow periods at the end of the shortlog
You can have other sections too (imagine the following section is in the same file as the above): [LineLength]
bears = LineLengthBear
files = *.py
max_line_length = 80
Again, LineLengthBear is a native solution.Of course, you can also combine native and external linters in the same section - they are virtually the same to the user.
"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"
I haven't used the one you linked to yet (thanks for the link!). Seems like it could be useful.