use of com.synopsys.integration.detect.workflow.report.writer.ReportWriter in project synopsys-detect by blackducksoftware.
the class DiagnosticReportHandler method configurationsReport.
public void configurationsReport(DetectInfo detectInfo, PropertyConfiguration propertyConfiguration, SortedMap<String, String> maskedRawPropertyValues) {
try {
ReportWriter profileWriter = getReportWriter(ReportTypes.CONFIGURATION);
ConfigurationReporter reporter = new ConfigurationReporter();
reporter.writeReport(profileWriter, detectInfo, propertyConfiguration, maskedRawPropertyValues);
} catch (Exception e) {
logger.error("Failed to write profiling report.", e);
}
}
use of com.synopsys.integration.detect.workflow.report.writer.ReportWriter in project synopsys-detect by blackducksoftware.
the class DiagnosticReportHandler method completedCodeLocations.
public void completedCodeLocations(Map<DetectCodeLocation, String> codeLocationNameMap) {
if (detectorToolResult == null || !detectorToolResult.getRootDetectorEvaluationTree().isPresent()) {
return;
}
try {
ReportWriter clWriter = getReportWriter(ReportTypes.CODE_LOCATIONS);
ReportWriter dcWriter = getReportWriter(ReportTypes.DEPENDENCY_COUNTS);
CodeLocationReporter clReporter = new CodeLocationReporter();
clReporter.writeCodeLocationReport(clWriter, dcWriter, detectorToolResult.getRootDetectorEvaluationTree().get(), detectorToolResult.getCodeLocationMap(), codeLocationNameMap);
} catch (Exception e) {
logger.error("Failed to write code location report.", e);
}
}
use of com.synopsys.integration.detect.workflow.report.writer.ReportWriter in project synopsys-detect by blackducksoftware.
the class DiagnosticReportHandler method detectorsProfiled.
private void detectorsProfiled(DetectorTimings detectorTimings) {
try {
ReportWriter profileWriter = getReportWriter(ReportTypes.DETECTOR_PROFILE);
ProfilingReporter reporter = new ProfilingReporter();
reporter.writeReport(profileWriter, detectorTimings);
} catch (Exception e) {
logger.error("Failed to write profiling report.", e);
}
}
use of com.synopsys.integration.detect.workflow.report.writer.ReportWriter in project synopsys-detect by blackducksoftware.
the class PreparationSummaryReporter method writeSummary.
private void writeSummary(ReportWriter writer, List<DetectorEvaluationTree> detectorEvaluationTrees) {
List<String> lines = new ArrayList<>();
for (DetectorEvaluationTree detectorEvaluationTree : detectorEvaluationTrees) {
List<DetectorEvaluation> applicable = DetectorEvaluationUtils.applicableChildren(detectorEvaluationTree);
List<DetectorEvaluation> ready = applicable.stream().filter(DetectorEvaluation::isExtractable).collect(Collectors.toList());
List<DetectorEvaluation> notExtractable = applicable.stream().filter(it -> !it.isExtractable()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(ready) || CollectionUtils.isNotEmpty(notExtractable)) {
lines.add(detectorEvaluationTree.getDirectory().toString());
if (CollectionUtils.isNotEmpty(ready)) {
lines.add("\t READY: " + ready.stream().map(it -> it.getDetectorRule().getDescriptiveName()).sorted().collect(Collectors.joining(", ")));
}
}
}
if (CollectionUtils.isNotEmpty(lines)) {
ReporterUtils.printHeader(writer, "Preparation for extraction");
lines.forEach(writer::writeLine);
ReporterUtils.printFooter(writer);
}
}
use of com.synopsys.integration.detect.workflow.report.writer.ReportWriter in project synopsys-detect by blackducksoftware.
the class DiagnosticReportHandler method configurationsReport.
public void configurationsReport(DetectInfo detectInfo, PropertyConfiguration propertyConfiguration, SortedMap<String, String> maskedRawPropertyValues, Set<String> propertyKeys) {
try {
ReportWriter profileWriter = getReportWriter(ReportTypes.CONFIGURATION);
ConfigurationReporter reporter = new ConfigurationReporter();
reporter.writeReport(profileWriter, detectInfo, propertyConfiguration, maskedRawPropertyValues, propertyKeys);
} catch (Exception e) {
logger.error("Failed to write profiling report.", e);
}
}
Aggregations