Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ where console output can be redirected into a file:

- Add a file `sonar-project.properties` at the root of your project (More details in the [official documentation](https://docs.sonarqube.org/8.9/analysis/scan/sonarscanner/#header-1))

- add an extra SonarQube analysis parameter `sonar.rust.clippy.reportPaths` setting the Clippy report file(s) location
- add an extra SonarQube analysis parameter `community.rust.clippy.reportPaths` setting the Clippy report file(s) location

NB: `sonar.rust.clippy.reportPaths` supports passing of multiple clippy report files by comma separating them.
NB: `community.rust.clippy.reportPaths` supports passing of multiple clippy report files by comma separating them.

## Adding coverage measures

Optionally SonarQube can also display Rust coverage measures
Optionally SonarQube can also display coverage measures

This Rust plugin doesn't run your tests or generate coverage reports for you. That has to be done before analysis and fed in in the form of reports.
This Community Rust plugin doesn't run your tests or generate coverage reports for you. That has to be done before analysis and provided in the form of reports.

Currently two coverage formats are supported :
Currently, two coverage formats are supported :

#### LCOV

Insert a parameter `sonar.rust.lcov.reportPaths` into you `sonar-project.properties` file.
Insert a parameter `community.rust.lcov.reportPaths` into you `sonar-project.properties` file.
The parameters sets the location of the LCOV report(s) (possibly a comma separated list of multiple LCOV reports)

#### COBERTURA

Insert a parameter `sonar.rust.cobertura.reportPaths` into you `sonar-project.properties` file.
Insert a parameter `community.rust.cobertura.reportPaths` into you `sonar-project.properties` file.
The parameters set the location of the COBERTURA report(s) (possibly a comma separated list of multiple COBERTURA reports)

The Rust plugin only requires you provide reports that comply to one of those formats. It does not need to know or care which tools are used to generate the data
Expand Down
25 changes: 10 additions & 15 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,37 @@
This project is built with Maven
Use : `mvn clean package`


* ### Why can't I find the plugin listed in the SonarQube Marketplace ?

This is a community supported plugin, not developed, maintained or supported by SonarSource (the company behind SonarQube product)
It is not listed yet on the MarketPlace
It may find its way some day when after some minimal user feedback is collected

* ### Can I use this plugin on SonarCloud ?

SonarCloud is a little different to SonarQube in that it doesn’t currently provide the ability to add third-party plugins like `Sonar rust`.

* ### Can I use this plugin on SonarLint ?

Currently `Sonar Rust` is not supported by SonarLint.
Currently the `Community Rust` plugin is not supported by SonarLint.

* ### Do I need a SonarQube license to use this plugin ?

You don't. The (free) Community edition v7.9+ is compatible (and so are Commercial editions of SonarQube)

* ### Can I scan my Rust source code from a CI/CD pipeline ?
* ### Can I scan my Rust source code from a CI/CD pipeline ? Can I get Pull Requests decoration ?

There is nothing specific for this plugin. Any CI pipeline which allows a SonarQube analysis can trigger an analysis on a Rust project
The only requirement is that the `Sonar Rust` plugin is installed on your SonarQube instance
The only requirement is that the `Community Rust` plugin is installed on your SonarQube instance

* ### How many coding rules / Quality Profiles does this Sonar Rust plugin provide ?
* ### Does this Community Rust plugin provide a built-in Quality Profile ?

No Rust rule or Quality profile are defined by this plugin. The plugin only report issues that Clippy has detected
Yes, but the current set of rules is very limited. Contributions for adding new rules are welcomed !

* ### My project is a mix of Rust and other programming languages, will this work ?

Yes, the issues on other languages will be detected by their respective language analyzer
Yes, the issues on other languages will be detected by their respective language analyzers

* ### How do I reach out for issues, feature requests or questions not listed here ?

Issues / Feature requests specific to this plugin can be tracked after you [create a Github issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-issues/creating-an-issue)
Issues that are related to SonarQube behaviour should be reported in their [Community forum](https://community.sonarsource.com/)
- Issues / Feature requests specific to this plugin can be tracked after you [create a Github issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-issues/creating-an-issue)
- Issues that are related to SonarQube behaviour should be reported in their [Community forum](https://community.sonarsource.com/)
- Private material (like source files failing to be parsed) can be sent at community-rust@pm.me


* ### How can I contribute to improving/fixing this plugin ?

Expand Down
3 changes: 2 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Sonar Rust Plugin (Community)
Community Rust Plugin
Copyright (C) 2021 Eric Le Goff
mailto:community-rust AT pm DOT me
http://github.com/elegoff/sonar-rust

This program is free software; you can redistribute it and/or
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ It leverages [Clippy lints](https://rust-lang.github.io/rust-clippy/master/) to
`cargo clippy --message-format=json &> <CLIPPY REPORT FILE>`
* Import it into SonarQube

set analysis parameter `sonar.rust.clippy.reportPaths=<CLIPPY REPORT FILE>`
set analysis parameter `community.rust.clippy.reportPaths=<CLIPPY REPORT FILE>`
* Optionally import coverage measures

use either

`sonar.rust.lcov.reportPaths`
`community.rust.lcov.reportPaths`

or

`sonar.rust.cobertura.reportPaths`
`community.rust.cobertura.reportPaths`


For more details, you may want to read :
Expand All @@ -40,7 +40,7 @@ For more details, you may want to read :

Your contribution and/or user feedback is welcomed

*Contact :* <sonar-rust@pm.me>
*Contact :* <community-rust@pm.me>



6 changes: 3 additions & 3 deletions rust-checks/pom.xml → community-rust-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<parent>
<groupId>org.elegoff</groupId>
<artifactId>rust-report</artifactId>
<artifactId>community-rust</artifactId>
<version>0.0.5-SNAPSHOT</version>
</parent>

<artifactId>rust-checks</artifactId>
<artifactId>community-rust-checks</artifactId>

<name>Rust :: Checks</name>

Expand All @@ -17,7 +17,7 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rust-frontend</artifactId>
<artifactId>community-rust-frontend</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
4 changes: 2 additions & 2 deletions rust-frontend/pom.xml → community-rust-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<parent>
<groupId>org.elegoff</groupId>
<artifactId>rust-report</artifactId>
<artifactId>community-rust</artifactId>
<version>0.0.5-SNAPSHOT</version>
</parent>

<artifactId>rust-frontend</artifactId>
<artifactId>community-rust-frontend</artifactId>

<name>Rust :: Frontend</name>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -51,12 +52,12 @@ private static LexerlessGrammarBuilder create(GrammarRuleKey root) {
}

public static ParserAdapter<LexerlessGrammar> create(RustParserConfiguration conf) {
return new ParserAdapter(conf.getCharset(), create().build());
return new ParserAdapter<>(conf.getCharset(), create().build());
}


public static ParserAdapter<LexerlessGrammar> create(RustParserConfiguration conf, GrammarRuleKey root) {
return new ParserAdapter(conf.getCharset(), create(root).build());
return new ParserAdapter<>(conf.getCharset(), create(root).build());
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Sonar Rust Plugin (Community)
* Community Rust Plugin
* Copyright (C) 2021 Eric Le Goff
* mailto:community-rust AT pm DOT me
* http://github.com/elegoff/sonar-rust
*
* This program is free software; you can redistribute it and/or
Expand Down
Loading