You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add setting clippy_output_diagnostics to match rustc_output_[...] (#3528)
Right now, capturing clippy's diagnostics is in a weird place.
`capture_clippy_output` exists, but it has drastically different
behavior from `rustc_output_diagnostics` in that it captures the
rendered error output and hides it from the terminal, whereas
`rustc_output_diagnostics` captures the raw JSON and still prints out
the rendered diagnostics.
The loss of the JSON is a bit of an issue. With that, the only way to
get JSON output from the command-line is to set `clippy_error_format`,
which will necessarily *clear the analysis cache* and rebuild all the
targets, meaning that you can't get both rendered output *and* JSON
output without either rebuilds in-between or relying on custom
transitions.
This adds the missing equivalent to `rustc_output_diagnostics` in the
form of a new option, `clippy_output_diagnostics`. In an ideal world,
I'd imagine this would be the *only* option to capture clippy output
(since for most intents and purposes, it's strictly a superset of
`capture_clippy_output`), but using a separate option and output group
preserves backwards compatibility while retaining the parallel naming of
`rustc_output_diagnostics` vs `clippy_output_diagnostics`, as well as
the output groups `rustc_output` vs `clippy_output`.
0 commit comments