- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
Description
Problem
In CI, it can be useful to generate a code-quality report while also printing a job log designed for humans to read. cargo check provides --message-format json, which enables generating machine-readable output that can be used to generate a report programmatically (e.g. with https://crates.io/crates/gitlab_clippy); but currently, there's no way to do this in such a way that cargo also produces useful human-readable output. cargo clippy --message-format json | tee <file> is too verbose and difficult to read.
Because of this, gitlab_clippy recommends running cargo check twice in CI, once to produce readable output and fail the job if there are errors, and again to produce a report.
Proposed Solution
There could be an additional flag that would take a file argument and permit sending json messages to that file, while emitting the "normal" Cargo output on stdout.
Notes
No response