aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-12-18 11:00:05 +0100
committerSteve Marion <steve.marion@sonarsource.com>2024-12-18 11:13:25 +0100
commitfb42f37f9e0f25420d67211690aa9bd4273faa08 (patch)
tree7a3a614cb7fb22f9f2f2dd77987b461ce09bd462 /sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
parentd3bba946fe854e126d713fce6dcfbcaa61b6eedd (diff)
downloadsonarqube-fb42f37f9e0f25420d67211690aa9bd4273faa08.tar.gz
sonarqube-fb42f37f9e0f25420d67211690aa9bd4273faa08.zip
SONAR-23974 Optimize the scanner report
Diffstat (limited to 'sonar-scanner-protocol/src/main/protobuf/scanner_report.proto')
-rw-r--r--sonar-scanner-protocol/src/main/protobuf/scanner_report.proto31
1 files changed, 27 insertions, 4 deletions
diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
index 74ff2bc0404..c86f48c91d9 100644
--- a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
+++ b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
@@ -100,6 +100,7 @@ message ActiveRule {
int64 createdAt = 5;
int64 updatedAt = 6;
string q_profile_key = 7;
+ repeated Impact impacts = 8;
}
message ComponentLink {
@@ -196,7 +197,7 @@ message Issue {
string rule_key = 2;
// Only when issue component is a file. Can also be empty for a file if this is an issue global to the file.
string msg = 3;
- Severity severity = 4;
+ optional Severity overriddenSeverity = 4;
double gap = 5;
// Only when issue component is a file. Can also be empty for a file if this is an issue global to the file.
// Will be identical to the first location of the first flow
@@ -206,7 +207,7 @@ message Issue {
optional string ruleDescriptionContextKey = 9;
repeated MessageFormatting msgFormatting = 10;
repeated string codeVariants = 11;
- repeated Impact overridenImpacts = 12;
+ repeated Impact overriddenImpacts = 12;
}
message ExternalIssue {
@@ -373,8 +374,30 @@ message AnalysisWarning {
}
message Impact {
- string software_quality = 1;
- string severity = 2;
+ SoftwareQuality software_quality = 1;
+ ImpactSeverity severity = 2;
+}
+
+enum ImpactSeverity {
+ // Zero is required in order to not get first entry as a default value
+ // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
+ ImpactSeverity_UNKNOWN_IMPACT_SEVERITY = 0;
+ ImpactSeverity_LOW = 1;
+ ImpactSeverity_MEDIUM = 2;
+ ImpactSeverity_HIGH = 3;
+ // INFO and BLOCKER conflicts with Severity enum, so we use different values prefixed with enum name
+ // See https://github.com/protocolbuffers/protobuf/issues/5425
+ ImpactSeverity_INFO = 4;
+ ImpactSeverity_BLOCKER = 5;
+}
+
+enum SoftwareQuality {
+ // Zero is required in order to not get first entry as a default value
+ // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
+ UNKNOWN_IMPACT_QUALITY = 0;
+ MAINTAINABILITY = 1;
+ RELIABILITY = 2;
+ SECURITY = 3;
}
message Dependency {