Live data from Hacker News

PMD source code analyzer

pmd.github.io

21–30 of 36 posts

Re: PMD source code analyzer

#21
post #20
post #7

I rarely write a bad code, just joking! But has anyone used the emacs plug-in for it? And is it any good?

FWIW we have an emacs plugin[1] for coala, which supports PMD. [1] https://github.com/coala/coala-emacs

Very interesting. I never used anything like pmd and I thought these tools are only available with advanced IDEs.

Re: PMD source code analyzer

#23
post #8

Here'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.

Another meta-linter: https://anonscm.debian.org/cgit/collab-maint/check-all-the-t...

Actually, coala is not entirely a meta-linter - we have a few native linters that we wrote ourselves too. However, a large chunk is external linters.

Re: PMD source code analyzer

#24
post #23

Earlier quoted context omitted.

Another meta-linter: https://anonscm.debian.org/cgit/collab-maint/check-all-the-t...

Actually, coala is not entirely a meta-linter - we have a few native linters that we wrote ourselves too. However, a large chunk is external linters.

It might be interesting to split those native linters out into separate projects so that other meta-linters like flycheck, check-all-the-things, various IDEs etc can also use them.

Re: PMD source code analyzer

#25
post #23

Earlier quoted context omitted.

Actually, coala is not entirely a meta-linter - we have a few native linters that we wrote ourselves too. However, a large chunk is external linters.

It might be interesting to split those native linters out into separate projects so that other meta-linters like flycheck, check-all-the-things, various IDEs etc can also use them.

Indeed. However, you can run just those native linters with coala too (on specific files or entire projects). And we currently have plugin support for a few editors.

Re: PMD source code analyzer

#26
post #25

Earlier quoted context omitted.

It might be interesting to split those native linters out into separate projects so that other meta-linters like flycheck, check-all-the-things, various IDEs etc can also use them.

Indeed. However, you can run just those native linters with coala too (on specific files or entire projects). And we currently have plugin support for a few editors.

Do your linters support the Firehose static analysis results format?

Re: PMD source code analyzer

#27
post #17
post #14

Earlier quoted context omitted.

If you're a Go programmer, there's a Go-specific metalinter: https://github.com/alecthomas/gometalinter

This seems especially useful when you don't want to think about how to set up linting, and what rules you want to use. There's a similar tool for Python, called prospector: https://github.com/landscapeio/prospector 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 wh…

check-all-the-things does exactly that already. Only knows about Debian dependencies so far though and still working on how to do automatic installs.

Re: PMD source code analyzer

#28
post #25

Earlier quoted context omitted.

Indeed. However, you can run just those native linters with coala too (on specific files or entire projects). And we currently have plugin support for a few editors.

Do your linters support the Firehose static analysis results format?

I'm not entirely sure what that format is, but coala can be formatted to output in any format you want using a `--format` flag. You have the result components such as message, line number, line, and several other parameters and you can build your own line.

And if that's not enough, you can also output as JSON.

Edit: and this applies to all linters - native and external.

Re: PMD source code analyzer

#29
post #28

Earlier quoted context omitted.

Do your linters support the Firehose static analysis results format?

I'm not entirely sure what that format is, but coala can be formatted to output in any format you want using a `--format` flag. You have the result components such as message, line number, line, and several other parameters and you can build your own line. And if that's not enough, you can also output as JSON. Edit: and this applies to all linters - native and external.

https://github.com/fedora-static-analysis/firehose

Re: PMD source code analyzer

#30
post #28

Earlier quoted context omitted.

I'm not entirely sure what that format is, but coala can be formatted to output in any format you want using a `--format` flag. You have the result components such as message, line number, line, and several other parameters and you can build your own line. And if that's not enough, you can also output as JSON. Edit: and this applies to all linters - native and external.

https://github.com/fedora-static-analysis/firehose

Interesting. I just took a look at the examples.

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!

Post reply on HN