Replies: 1 comment 4 replies
-
Maybe -- do you have some examples of specific clippy output that you think should be included and/or links I can follow? Technically there are few limitations to be aware of:
Ideally I would like to figure out if we can map the additional information you mentioned into a standardized SARIF field, which has a standard display style, because I would like |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
cargo
has the option to include the original error message into its output JSON. The error message can even contain all ANSI codes for proper formatting. The option to do so is--message-format=json-diagnostic-rendered-ansi
. The output ofsarif-fmt
looks good, but sometimes the original error has further details.Would it be possible to teach
clippy-sarif
to output these pre-formatted error on stderr and writing the SARIF to stdout?Then this command
cargo clippy --all-targets --all-features --message-format=json | clippy-sarif | tee results.sarif | sarif-fmt
could be changed tocargo clippy --all-targets --all-features --message-format=json-diagnostic-rendered-ansi | clippy-sarif >results.sarif
.Example
Code
clippy prints the note about
macro-backtrace
and a hint about thetodo!()
line as the cause.clippy-sarif/sarif-fmt seems to have a problem with macros.
Clippy JSON
Sarif
Beta Was this translation helpful? Give feedback.
All reactions