diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2018-09-06 18:02:56 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-09-24 20:20:58 +0200 |
commit | 1cacbb1d2ed72d720058580746d678ba8da1b453 (patch) | |
tree | 3d08e44365ae38fb975239385d301fc64973f541 /sonar-scanner-engine/src/main/java/org | |
parent | cfba7fcb6500d8217bd81ecfcb8f47ec48ad55f2 (diff) | |
download | sonarqube-1cacbb1d2ed72d720058580746d678ba8da1b453.tar.gz sonarqube-1cacbb1d2ed72d720058580746d678ba8da1b453.zip |
SONAR-11209 Store ad hoc rules coming from scanner in rules_metadata
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java index f7f3b9898d6..88f47c292ab 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java @@ -407,7 +407,10 @@ public class DefaultSensorStorage implements SensorStorage { builder.setEngineId(adHocRule.engineId()); builder.setRuleId(adHocRule.ruleId()); builder.setName(adHocRule.name()); - builder.setDescription(adHocRule.description()); + String description = adHocRule.description(); + if (description != null) { + builder.setDescription(description); + } builder.setSeverity(Constants.Severity.valueOf(adHocRule.severity().name())); builder.setType(ScannerReport.IssueType.valueOf(adHocRule.type().name())); writer.appendAdHocRule(builder.build()); |