diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2018-08-10 15:04:29 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2018-09-19 10:51:39 +0200 |
commit | f2dbe93832ced5dd2a2edea0cb465c001ffbbd01 (patch) | |
tree | d5215f40e655d9a48fa6bad0e2b16a1c0abf4096 /sonar-scanner-protocol | |
parent | 269c963c54bd2234bc52ec3a30ba73ebd30b44ed (diff) | |
download | sonarqube-f2dbe93832ced5dd2a2edea0cb465c001ffbbd01.tar.gz sonarqube-f2dbe93832ced5dd2a2edea0cb465c001ffbbd01.zip |
SONAR-11151 Load changed lines from the report
Diffstat (limited to 'sonar-scanner-protocol')
-rw-r--r-- | sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java | 9 |
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); |