- Sonarqube currently does't have rust support.
- To scan sonarqube you will need Clippy to generate a json report file
- You will also need Sonar-Rust, a rust plugin for sonarqube to read the results generated in clippy report file.
- Link to rust-clippy - https://github.com/rust-lang/rust-clippy
- Link to sonar-rust - https://github.com/elegoff/sonar-rust
- Install clippy
- Add sonar-rust to sonarqube plugins
- Generate clippy report file on your rust project using
cargo clippy --message-format=json &> sample-report.json
- Start sonarqube and pass the generated clippy report to it using
sonar-scanner -Dsonar.rust.clippy.reportPaths=sample-report.json
- Login to sonarqube and view your resutls after.