Skip to content

Commit

Permalink
Code review remarks
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Trifanov <[email protected]>
  • Loading branch information
mstachniuk and petertrr authored Dec 11, 2024
1 parent a99b300 commit ba01903
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ protected RuleKey createRuleKey(String source, RuleType ruleType, Severity ruleS
@Override
protected List<Impact> impacts(String severity, String source) {
var isSonarCloud = context.runtime().getProduct() == SonarProduct.SONARQUBE && context.runtime().getEdition() == SonarEdition.SONARCLOUD;
if (!isSonarCloud) {
if (isSonarCloud) {
// SonarQube Cloud does not yet support the `impact` field for external issues
if (GOSEC.equals(source)) {
return List.of(new Impact(SoftwareQuality.SECURITY, org.sonar.api.issue.impact.Severity.MEDIUM));
}
return List.of(new Impact(SoftwareQuality.MAINTAINABILITY, org.sonar.api.issue.impact.Severity.MEDIUM));
return List.of();
}
return List.of();
if (GOSEC.equals(source)) {
return List.of(new Impact(SoftwareQuality.SECURITY, org.sonar.api.issue.impact.Severity.MEDIUM));
}
return List.of(new Impact(SoftwareQuality.MAINTAINABILITY, org.sonar.api.issue.impact.Severity.MEDIUM));
}
}
}

0 comments on commit ba01903

Please sign in to comment.