diff options
author | Eric Giffon <eric.giffon@sonarsource.com> | 2023-05-08 17:01:38 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-16 20:02:49 +0000 |
commit | 0f6906caea05555b37525e165b363d45521ed7f6 (patch) | |
tree | 2bddc60e63e202d5997fbfec631ea205b44e33fd /sonar-scanner-engine/src/main/java/org/sonar | |
parent | 317e473e154d014b6c3d258fddbc82ffe8b7093a (diff) | |
download | sonarqube-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.java | 4 |
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(); } |