aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-protocol')
-rw-r--r--sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java9
1 files changed, 9 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 7da8a34470e..65c7bb79a05 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
@@ -129,6 +129,15 @@ public class ScannerReportReader {
return null;
}
+ @CheckForNull
+ public ScannerReport.ChangedLines readComponentChangedLines(int fileRef) {
+ File file = fileStructure.fileFor(FileStructure.Domain.CHANGED_LINES, fileRef);
+ if (fileExists(file)) {
+ return Protobuf.read(file, ScannerReport.ChangedLines.parser());
+ }
+ return null;
+ }
+
public boolean hasSignificantCode(int fileRef) {
File file = fileStructure.fileFor(FileStructure.Domain.SGNIFICANT_CODE, fileRef);
return fileExists(file);