aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
index e773c0d3bcf..fd24e4b4052 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
@@ -31,6 +31,7 @@ import org.sonar.api.batch.scm.ScmProvider;
import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
+import org.sonar.core.documentation.DocumentationLinkGenerator;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Changesets.Builder;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
@@ -49,11 +50,12 @@ public final class ScmPublisher {
private final InputComponentStore componentStore;
private final FileSystem fs;
private final ScannerReportWriter writer;
- private AnalysisWarnings analysisWarnings;
+ private final AnalysisWarnings analysisWarnings;
private final BranchConfiguration branchConfiguration;
+ private final DocumentationLinkGenerator documentationLinkGenerator;
public ScmPublisher(ScmConfiguration configuration, ProjectRepositories projectRepositories, InputComponentStore componentStore, FileSystem fs,
- ReportPublisher reportPublisher, BranchConfiguration branchConfiguration, AnalysisWarnings analysisWarnings) {
+ ReportPublisher reportPublisher, BranchConfiguration branchConfiguration, AnalysisWarnings analysisWarnings, DocumentationLinkGenerator documentationLinkGenerator) {
this.configuration = configuration;
this.projectRepositories = projectRepositories;
this.componentStore = componentStore;
@@ -61,6 +63,7 @@ public final class ScmPublisher {
this.branchConfiguration = branchConfiguration;
this.writer = reportPublisher.getWriter();
this.analysisWarnings = analysisWarnings;
+ this.documentationLinkGenerator = documentationLinkGenerator;
}
public void publish() {
@@ -79,7 +82,7 @@ public final class ScmPublisher {
if (!filesToBlame.isEmpty()) {
String key = provider.key();
LOG.info("SCM Publisher SCM provider for this project is: " + key);
- DefaultBlameOutput output = new DefaultBlameOutput(writer, analysisWarnings, filesToBlame);
+ DefaultBlameOutput output = new DefaultBlameOutput(writer, analysisWarnings, filesToBlame, documentationLinkGenerator);
try {
provider.blameCommand().blame(new DefaultBlameInput(fs, filesToBlame), output);
} catch (Exception e) {