Skip to content

Commit

Permalink
Import rules for severity "DO_NOT_SHOW".
Browse files Browse the repository at this point in the history
These are just disabled by default and depending on the project/company policy they should be enabled or not. Previously these types of rules were not imported at all, making them unavailable for tracking in SonarQube.
This was noticeable due to the fact that we now export the ReSharper rules via InspectCode with --no-buildin-settings to make them even with the ReSharper default. Some rules (e.g. TabsAreDisallowed) changed in that process to "DO_NOT_SHOW" which made them disappear after an update to this plugin >= 1.0.0.202013.

With this change we now support/provide C# rules with "DO_NOT_SHOW" severity because this is just a pre-set that the individual use could change and otherwise these rules would not even be available.

Issue #6
  • Loading branch information
steffen-wilke committed Jun 10, 2020
1 parent 0205007 commit 137063b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.soloplan.oss.sonarqube.plugin.resharper.clt</groupId>
<artifactId>resharper-clt-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>1.1.1.202013</version>
<version>1.2.0.202013</version>

<name>ReSharper command line tools plugin for SonarQube 7.9.x LTS</name>
<description>Enables the use of ReSharper command line tools with rules on C# and VB.NET code.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ private InspectCodePredicates() { /* Do nothing*/ }
* InspectCodeIssueSeverity#DO_NOT_SHOW} and {@link InspectCodeIssueSeverity#INVALID_SEVERITY}.
*/
public static Predicate<InspectCodeIssueDefinitionModel> hasValidIssueSeverity() {
return inspectCodeIssueDefinitionModel ->
inspectCodeIssueDefinitionModel.getSeverity() != InspectCodeIssueSeverity.DO_NOT_SHOW
&& inspectCodeIssueDefinitionModel.getSeverity() != InspectCodeIssueSeverity.INVALID_SEVERITY;
return inspectCodeIssueDefinitionModel -> inspectCodeIssueDefinitionModel.getSeverity() != InspectCodeIssueSeverity.INVALID_SEVERITY;
}

/**
Expand Down

0 comments on commit 137063b

Please sign in to comment.