google / google/error-prone

[Discussion] Serialization of Error Prone diagnostics

Open
#3,766 24 comments 6 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

A question in three parts:

1. Is there any option/flag for serializing Error Prone diagnostics (i.e. the [Description](https://github.com/google/error-prone/blob/master/check_api/src/main/java/com/google/errorprone/matchers/Description.java) object) into some machine parsable format (i.e. some standard like [SARIF](https://sarifweb.azurewebsites.net/) or even a custom JSON), in addition to emitting compiler errors/warnings?
2. If that option doesn't exist, has it ever been previously discussed?
3. Assuming it isn't already there somewhere, is this something that would be desirable upstream? Any ideas on what it might look like?

I might well be missing previous discussions, but I tried to search the repo and the docs and I didn't find anything of the sort.

The context around the ask is that we are looking for ways to surface the diagnostics from non-blocking checks (i.e. `SUGGESTION` and for some configurations `WARNING`) both inside an IDE and also during code review. We can potentially parse the output of `javac`, but that means over-emitting stuff (again, see `SUGGESTION` level checks) and also seems more fragile than just somehow getting the results serialized from Error Prone, with potentially more detailed location information.

cc: @msridhar @cpovirk @raviagarwal7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.