typetools / checker-framework

Pluggable type-checking for Java
http://checkerframework.org/
Other
1.03k stars 356 forks source link

Generate report file from analysis. #5666

Open Vyom-Yadav opened 1 year ago

Vyom-Yadav commented 1 year ago

Currently, Checker Framework outputs all the warnings and errors to the console.

When using a build system like maven or gradle, the order of output can vary (see known bug with maven).

Checker Framework should generate a parsable report file which can be easily extended to create universal suppression systems, etc.

Currently, at Checkstyle, we use a custom suppression model built with groovy, which parses the output and checks the .xml suppression file.

msridhar commented 1 year ago

If / when someone has cycles to work on this, this Error Prone issue / discussion might be relevant:

https://github.com/google/error-prone/issues/3766

In particular @tbroyer prototyped a relatively non-intrusive way to serialize Error Prone warnings:

https://github.com/google/error-prone/issues/3766#issuecomment-1426834718

A similar approach may work here.

mernst commented 1 year ago

I was thinking of just defining a new subclass of Messager, which could be done within the Checker Framework.

mernst commented 5 months ago

A few notes for anyone who wants to take up this project: