bazelbuild / bazelbuild/rules_rust

Introduce a separate build setting for the error format used by Clippy

Open
#3,494 0 comments 1 reaction 0 assignees View on GitHub
needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

Today, the error format used by Clippy is governed by `rust/settings:error_format`, the same build setting that controls the error format used by rustc. As a result, the format output by both tools is always the same. This can be an issue if a system wants to capture the output of both the Clippy aspect and the underlying rustc compile but use them for different purposes. For example, it is currently not possible to configure Clippy findings to be output as JSON (for further processing) and rustc diagnostics to be output in human-readable form (for direct display).

I therefore intend to introduce a new build setting, `rust/settings:clippy_error_format` to control the output format of Clippy. The existing setting `rust/settings:error_format` will then only control the output format of rustc.

This is a backwards-incompatible change, so I will put it behind a feature flag called `incompatible_change_clippy_error_format`.

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.