SonarQube now supports Rust!

Dear Community,

We are thrilled to announce that SonarQube Cloud now supports Rust!

We have had a lot of requests for Rust support, and it is finally available.
With this first release, we aim at making it possible for you to adopt Rust in your toolkit and onboard your project in SonarQube to help you write more maintainable code.

Rust comes with its own trusted linter, Clippy, so we built this first release on top of it.

This release features

  • 85 Clippy rules you can use in your Quality Profile
  • Code coverage ingestion (LCOV and Cobertura format)
  • Cognitive Complexity and Cyclomatic Complexity metrics

This analyzer requires both cargo and Clippy to be installed on the analysis machine, as Clippy will be invoked automatically.

Alternatively, you can disable Clippy invocation (by using the sonar.rust.clippy.enable analysis property) and supply a JSON file containing the Clippy issues (by using the sonar.rust.clippy.reportPaths analysis property). In that case all the issues will be imported as external issues and the Quality Profile settings will not apply.

This analyzer is available today on SonarQube Cloud.
It will be available in SonarQube Server 2025 Release 3 and in the next release of SonarQube Community Build.
Support for SonarQube for IDE will come at a later date.

Please note that, for now, Rust does not support Automatic Analysis, so you will have to use CI-based analysis.

We are eager to hear from you, so don’t hesitate to reach out if you encounter any issues. Positive feedback is also welcome!

Denis

13 Likes