google / error-prone

Catch common Java mistakes as compile-time errors
https://errorprone.info
Apache License 2.0
6.83k stars 742 forks source link

Generate parsable reportfile #444

Open tomasbjerre opened 8 years ago

tomasbjerre commented 8 years ago

I'd like to be able to generate reportfiles with result of the analysis. In my case I need a parsable report (there are some examples to perhaps resemble here).

tomasbjerre commented 6 years ago

I'm currently supporting it by parsing the output from the build log: https://github.com/tomasbjerre/violations-lib/blob/master/src/main/java/se/bjurr/violations/lib/parsers/GoogleErrorProneParser.java

But still a format made for parsing would be better!

leinardi commented 6 years ago

+1 for this request, this will help with CI since parsing the entire build output for ErrorProne errors isn't that easy and reliable.

tomasbjerre commented 4 years ago

@cushon @nglorioso @graememorgan @eaftan @cpovirk

Some attention here would be nice. There was a working PR #1132 that now has conflicts due to slow feedback...

This feature would really help introduce this great tool in legacy projects!

Vyom-Yadav commented 2 years ago

+1 It would be nice if this is implemented, currently at Checkstyle, we are using a custom groovy script to parse the output and get the errors. Built-in support will be beneficial.

tbroyer commented 1 year ago

ErrorProne uses standard javac diagnostics, so IMO this is something that should be supported at the build tool level. This would then automatically include Xlint warnings and other compilation errors as well.

faisal6621 commented 2 months ago

I'm currently supporting it by parsing the output from the build log: https://github.com/tomasbjerre/violations-lib/blob/master/src/main/java/se/bjurr/violations/lib/parsers/GoogleErrorProneParser.java

But still a format made for parsing would be better!

Hi @tomasbjerre I was looking at the https://github.com/tomasbjerre/violations-lib/ and https://github.com/tomasbjerre/violations-maven-plugin. However, in your example for the maven plugin you have not explained well what the <pattern> should be for various parsers?

Can you explain that or mention what pattern should be used for GoogleErrorProne?

Regards, Faisal