diff --git a/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java b/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java index 2b289568..49926474 100644 --- a/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java +++ b/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java @@ -91,14 +91,14 @@ protected RuleKey createRuleKey(String source, RuleType ruleType, Severity ruleS @Override protected List 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)); } } }