Extract creation of blamer.
@@ -115,6 +115,16 @@ class IssuesScanner {
report.logInfo("Post processing issues on '%s' with source code encoding '%s'",
getAgentName(workspace), sourceCodeEncoding);
+ result = workspace.act(new ReportPostProcessor(
+ tool.getActualId(), report, sourceCodeEncoding.name(),
+ createBlamer(report), createMiner(report), filters));
+ copyAffectedFiles(result.getReport(), createAffectedFilesFolder(result.getReport()), workspace);
+ }
+ logger.log(result.getReport());
+ return result;
+ }
+
+ private Blamer createBlamer(final Report report) {
Blamer blamer;
if (blameMode == BlameMode.DISABLED) {
report.logInfo("Skipping SCM blames as requested");
@@ -129,13 +139,7 @@ class IssuesScanner {
log.getErrorMessages().forEach(report::logError);
}
- result = workspace.act(new ReportPostProcessor(
- tool.getActualId(), report, sourceCodeEncoding.name(),
- blamer, createMiner(report), filters));
- copyAffectedFiles(result.getReport(), createAffectedFilesFolder(result.getReport()), workspace);
- }
- logger.log(result.getReport());
- return result;
+ return blamer;
}
private RepositoryMiner createMiner(final Report report) {
