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

Hi Denis,

That’s fantastic news! As part of the Rust developer community, we’ve eagerly anticipated Rust support in SonarQube Cloud, and it’s great to see it finally become a reality.

Building the integration directly on top of Clippy is a smart move since it’s widely trusted within our community. The addition of metrics like Cognitive Complexity and Cyclomatic Complexity will significantly help teams improve the readability and maintainability of their Rust codebases.

The flexibility of supplying a JSON report from Clippy or invoking it automatically is also very practical. It suits various workflows, especially CI-based setups.

Looking forward to trying it out and contributing feedback. Keep up the great work!

Best regards,
Cyprien

6 Likes

May I know when this Release 3 is happening ?

Can you link to the documentation or to an example of a sonar-project.properties file?

Hi, @txdv, and welcome to the community!

You can find the rust-specific information in our online documentation for SonarQube Cloud.

I do not have an example of project.properties for Rust at hand, unfortunately.

Denis.

1 Like