diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2022-06-22 16:17:26 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-07-23 20:02:53 +0000 |
commit | 0fb5e45d935ad212aa3fe32202c33dd8395078c5 (patch) | |
tree | 4c2afc044dc034f9c70a11b58f02a762b3ba3448 /sonar-scanner-protocol | |
parent | 1220331cf405fb916a005284120b0ed02ea67ac2 (diff) | |
download | sonarqube-0fb5e45d935ad212aa3fe32202c33dd8395078c5.tar.gz sonarqube-0fb5e45d935ad212aa3fe32202c33dd8395078c5.zip |
SONAR-17044 Optimize Compute Engine issue tracking and persisting of measures when file is marked as unchanged
Diffstat (limited to 'sonar-scanner-protocol')
-rw-r--r-- | sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java | 5 | ||||
-rw-r--r-- | sonar-scanner-protocol/src/main/protobuf/scanner_report.proto | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java index 006bdf66760..b4ba603055e 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java @@ -108,6 +108,11 @@ public class ScannerReportReader { return emptyCloseableIterator(); } + public boolean hasIssues(int componentRef) { + File file = fileStructure.fileFor(FileStructure.Domain.ISSUES, componentRef); + return fileExists(file); + } + public CloseableIterator<ScannerReport.ExternalIssue> readComponentExternalIssues(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.EXTERNAL_ISSUES, componentRef); if (fileExists(file)) { diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto index 9b2b159dc31..4870c034282 100644 --- a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto +++ b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto @@ -131,6 +131,7 @@ message Component { // Path relative to project base directory string project_relative_path = 14; + bool markedAsUnchanged = 15; enum ComponentType { UNSET = 0; |