# \[NEW RELEASE\] Sonar Rust Plugin 0.0.4

**URL:** <https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792>\
**Category:** Plugin Development\
**Created:** [June 14, 2021, 3:48pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792 "2021-06-14T15:48:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![elegoff](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/elegoff/32/24492_2.png) [@elegoff](https://community.sonarsource.com/u/elegoff)\
**Post date:** [June 14, 2021, 3:48pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/1 "2021-06-14T15:48:05Z")

</div>

I’m pleased to request inclusion of the sonar-rust-plugin 0.0.4.  
It provides ability to scan Rust source code, import Clippy lints and coverage reports with LCOV or Cobertura formats

Release note : [Release sonar-rust v0.0.4 · elegoff/sonar-rust · GitHub](https://github.com/elegoff/sonar-rust/releases/tag/v0.0.4)  
Link to binary: [https://github.com/elegoff/sonar-rust/releases/download/v0.0.4/sonar-rust-plugin-0.0.4.jar](https://github.com/elegoff/sonar-rust/releases/download/v0.0.4/sonar-rust-plugin-0.0.4.jar)  
Project site: [GitHub - elegoff/sonar-rust: SonarQube plugin to analyze Rust files](https://github.com/elegoff/sonar-rust)  
SonarCloud Quality Gate: [https://sonarcloud.io/dashboard?id=elegoff\_sonar-rust](https://sonarcloud.io/dashboard?id=elegoff_sonar-rust)  
Link to the sonar-update-center-properties pull request : [request sonar-rust inclusion to marketplace by elegoff · Pull Request #224 · SonarSource/sonar-update-center-properties · GitHub](https://github.com/SonarSource/sonar-update-center-properties/pull/224)

Please note that the plugin should be added to the Plugin Library page

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [June 23, 2021, 12:54pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/2 "2021-06-23T12:54:14Z")

</div>

Hi,

Congrats on your plugin. So you know, your request is in queue behind [this one](https://community.sonarsource.com/t/new-release-findbugs-slf4j-1-5-0/36565), which I’m already frightfully, embarrassingly late in getting to. So it may take a while to get to yours but I’ll do it eventually.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 8, 2021, 5:54pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/3 "2021-07-08T17:54:18Z")

</div>

Hi,

I’ve had a chance to start looking at this.

I’ve left a few comments on your PR but a bigger change is needed. Your plugin key (i.e. the name of the file) can’t simply be the name of a language. In fact, “rust” is specifically listed as a “don’t do” example for choosing a plugin key. 😂 Since you import Clippy lint reports, maybe `rustclippy`? Or `communityrust`? Or…

The rest of the [bureaucratic requirements](https://community.sonarsource.com/t/deploying-to-the-marketplace/35236) look good except for number 9, which I’ll look at when I do my testing.

Also, can you point me to a project to test with? Hopefully one that already has a Clippy report available?

Even before running an analysis, I see in the interface that you’ve added the Rust language and registered the file extension. Cool.

You’ve also provided a default profile but there are no rules, so the profile is empty. This is really weird.

I guess you’re importing the Clippy issues as external issues…? Is this something you plan to change in the future? Because as-is I have to wonder why you’re declaring the language and not just providing a pure utility to import Clippy issues (on unrecognized files). I guess you’ve declared the language so you can also import coverage data? If so… I think I’m going to have to hold out for a non-empty default profile. 🤷‍♀️

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![elegoff](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/elegoff/32/24492_2.png) [@elegoff](https://community.sonarsource.com/u/elegoff)\
**Post date:** [July 30, 2021, 3:16pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/4 "2021-07-30T15:16:02Z")

</div>

Ann,

Thanks again for your feedback. It led me to make some changes in both the PR and the code.

- In the PR , I have changed the plugin key from `rust` to `communityrust` as per your suggestion
- Bureautic requirement #9 should be fine as lines of codes are counted  
 ![NCLOC](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/6/861a308599b854186f6a18ce837535632b0a7e31.png) (FYI this screenshot from the [GitHub - containers/youki: A container runtime written in Rust](https://github.com/containers/youki) project)
- I made up a demo Rust project which has both a Clippy and a coverage report , see [GitHub - elegoff/clippy-examples](https://github.com/elegoff/clippy-examples)

I confirm Clippy lints are imported as external issues and language declaration was actually because the plugin also allows to import coverage data (as you had guessed)

I have released a new version (v0.0.5) of the plugin , with a (very) limited set of rules in the built-in profile (at least it is no more empty 😉 )

Thanks again for your time checking this !

All the best

Eric

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 30, 2021, 6:35pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/5 "2021-07-30T18:35:01Z")

</div>

Hi Eric,

This looks good, and we’re nearly there. But…

Your properties file name must match your plugin key. When I run the generation job I get:

> Failed to execute goal org.sonarsource.update-center:sonar-u ###### -plugin-0.0.5.jar is declared with key ‘rustreport’ in its MANIFEST, but with key ‘communityrust’ in the update center

You’re going to need to re-release.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![elegoff](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/elegoff/32/24492_2.png) [@elegoff](https://community.sonarsource.com/u/elegoff)\
**Post date:** [July 30, 2021, 7:08pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/6 "2021-07-30T19:08:13Z")

</div>

Done.  
`Plugin-Key: communityrust`

Thanks again for your help

Eric

---

<div class="post-metadata">

**Author:** ![elegoff](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/elegoff/32/24492_2.png) [@elegoff](https://community.sonarsource.com/u/elegoff)\
**Post date:** [August 11, 2021, 12:42pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/7 "2021-08-11T12:42:54Z")

</div>

Hello Ann,

As discussed I have released a new version (Community Rust v0.0.6) of the plugin after fixing the plugin key  
I have created a new PR : [Request inclusion of community-rust plugin to the Marketplace by elegoff · Pull Request #234 · SonarSource/sonar-upd](https://github.com/SonarSource/sonar-update-center-properties/pull/234)

Let me know if something is missing to add it to the Plugin Library page

Eric

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 11, 2021, 1:02pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/8 "2021-08-11T13:02:15Z")

</div>

Hi Eric,

Sorry for the delay. I just need to find time to come back to this.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 13, 2021, 12:20pm UTC](https://community.sonarsource.com/t/new-release-sonar-rust-plugin-0-0-4/44792/9 "2021-08-13T12:20:12Z")

</div>

Hi Eric,

Sorry for the delay on this. I had forgotten where we were in the process & was thinking I needed to re-test, so I was putting this off until I had a chunk of time.

Aaand… you’re in!

&nbsp;  
Congrats!  
Ann
