aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar
diff options
context:
space:
mode:
authorEric Giffon <eric.giffon@sonarsource.com>2023-05-08 17:01:38 +0200
committersonartech <sonartech@sonarsource.com>2023-05-16 20:02:49 +0000
commit0f6906caea05555b37525e165b363d45521ed7f6 (patch)
tree2bddc60e63e202d5997fbfec631ea205b44e33fd /sonar-scanner-engine/src/main/java/org/sonar
parent317e473e154d014b6c3d258fddbc82ffe8b7093a (diff)
downloadsonarqube-0f6906caea05555b37525e165b363d45521ed7f6.tar.gz
sonarqube-0f6906caea05555b37525e165b363d45521ed7f6.zip
SONAR-19197 Add field for code variants to scanner-engine
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
index 0e0cd3205b0..5e3b7a6d254 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
@@ -131,6 +131,10 @@ public class IssuePublisher {
applyFlows(builder::addFlow, locationBuilder, textRangeBuilder, issue.flows());
builder.setQuickFixAvailable(issue.isQuickFixAvailable());
issue.ruleDescriptionContextKey().ifPresent(builder::setRuleDescriptionContextKey);
+ List<String> codeVariants = issue.codeVariants();
+ if (codeVariants != null) {
+ builder.addAllCodeVariants(codeVariants);
+ }
return builder.build();
}