aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest
diff options
context:
space:
mode:
authorMichal Duda <michalno1@gmail.com>2018-11-13 11:00:42 +0100
committersonartech <sonartech@sonarsource.com>2019-01-16 09:43:00 +0100
commit6dd294b1f5af7c74191db30101e3721d00102204 (patch)
tree372dbc219371a610c32fb8b723869291a7148c5f /sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest
parentb44c75c2b93ca2d91d6ce559a08a0d994c73bd85 (diff)
downloadsonarqube-6dd294b1f5af7c74191db30101e3721d00102204.tar.gz
sonarqube-6dd294b1f5af7c74191db30101e3721d00102204.zip
SONAR-11459 move dir and module issues to root
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
index b510f895a51..d2ea9681433 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
@@ -36,6 +36,7 @@ import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.fs.InputDir;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.fs.InputModule;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.fs.internal.DefaultInputFile;
@@ -63,6 +64,7 @@ public class TaskResult implements org.sonar.scanner.mediumtest.ScanTaskObserver
private Map<String, InputFile> inputFiles = new HashMap<>();
private Map<String, Component> reportComponents = new HashMap<>();
private Map<String, InputDir> inputDirs = new HashMap<>();
+ private InputModule root;
private ScannerReportReader reader;
@Override
@@ -78,6 +80,8 @@ public class TaskResult implements org.sonar.scanner.mediumtest.ScanTaskObserver
Metadata readMetadata = getReportReader().readMetadata();
int rootComponentRef = readMetadata.getRootComponentRef();
storeReportComponents(rootComponentRef, null);
+ InputComponentStore inputFileCache = container.getComponentByType(InputComponentStore.class);
+ root = inputFileCache.root();
}
storeFs(container);
@@ -154,6 +158,10 @@ public class TaskResult implements org.sonar.scanner.mediumtest.ScanTaskObserver
return result;
}
+ public InputModule root() {
+ return root;
+ }
+
public Collection<InputFile> inputFiles() {
return inputFiles.values();
}