bazelbuild / bazelbuild/rules_rust
No way to use capture_clippy_output with json error format for clippy only
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
I'd like to write a rule that uses capture_clippy_output to get Clippy diagnostics in JSON format. Right now, the only way to do so is using `--@rules_rust//:capture_clippy_output=True --@rules_rust//:error_format=json` (actually I'm using the equivalent transition). However, error_format=json applies globally to all the deps, meaning that if any dependencies emit warnings, they print to the console as JSON.
I'd argue that capture_clippy_output should just imply --error-format=json but _only for the clippy-driver invocation_ - it seems unlikely that a machine consumer would want the non-json format. Or I guess we could have a separate `clippy_output_error_format` config (or change `capture_clippy_output` to a string).
Contributor guide
Assessment
This issue has not been assessed yet.