rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.46k stars 1.54k forks source link

Query: Integration with coverity #12946

Closed vithalsm closed 4 months ago

vithalsm commented 5 months ago

Description

Hi, Planning to use 'cargo clippy' and integrate the output with 'coverity' using 'cov-import-results'. 'cov-import-results' expects files/list of issues listed in xml format. However 'cargo clippy' doesnt seem to have a way to product output in that format.

So, what is the right way to achieve same? Appreciate any help on this regard.

Reference - https://community.synopsys.com/s/article/Does-Coverity-Support-Rust

Thanks in advance.

Version

No response

Additional Labels

No response

Alexendoo commented 5 months ago

Cargo has --message-format=json for machine readable output

You're probably best off asking Synopsys what the intended way to import the issues are

vithalsm commented 4 months ago

Looks like 'Synopsis' expects in certain format of json. So, using '--message-forma=json' and passing the input to cov-import-results doesn't help.

Alexendoo commented 4 months ago

Right, clippy/cargo aren't going to add an output format for this specific tool, so you'll have to find out what Synopsys wants you to do or adapt it into the format it accepts yourself