use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.ReportWriter in project hub-detect by blackducksoftware.
the class DiagnosticReportHandler method detectorsProfiled.
private void detectorsProfiled(DetectorTimings detectorTimings) {
try {
final ReportWriter profileWriter = getReportWriter(ReportTypes.DETECTOR_PROFILE);
final ProfilingReporter reporter = new ProfilingReporter();
reporter.writeReport(profileWriter, detectorTimings);
} catch (final Exception e) {
logger.error("Failed to write profiling report.", e);
}
}
use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.ReportWriter in project hub-detect by blackducksoftware.
the class DiagnosticReportHandler method completedCodeLocations.
public void completedCodeLocations(final Map<DetectCodeLocation, String> codeLocationNameMap) {
if (completedDetectorEvaluations == null)
return;
try {
final ReportWriter clWriter = getReportWriter(ReportTypes.CODE_LOCATIONS);
final ReportWriter dcWriter = getReportWriter(ReportTypes.DEPENDENCY_COUNTS);
final CodeLocationReporter clReporter = new CodeLocationReporter();
clReporter.writeCodeLocationReport(clWriter, dcWriter, completedDetectorEvaluations, codeLocationNameMap);
} catch (final Exception e) {
logger.error("Failed to write code location report.", e);
}
}
use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.ReportWriter in project hub-detect by blackducksoftware.
the class DiagnosticReportHandler method configurationsReport.
public void configurationsReport(DetectInfo detectInfo, List<DetectOption> detectOptions) {
try {
final ReportWriter profileWriter = getReportWriter(ReportTypes.CONFIGURATION);
final ConfigurationReporter reporter = new ConfigurationReporter();
reporter.writeReport(profileWriter, detectInfo, detectOptions);
} catch (final Exception e) {
logger.error("Failed to write profiling report.", e);
}
}
use of com.blackducksoftware.integration.hub.detect.workflow.report.writer.ReportWriter in project hub-detect by blackducksoftware.
the class DetectConfigurationReporter method printWarnings.
public void printWarnings(ReportWriter writer, final List<DetectOption> detectOptions) {
final List<DetectOption> sortedOptions = sortOptions(detectOptions);
final List<DetectOption> allWarnings = sortedOptions.stream().filter(it -> it.getWarnings().size() > 0).collect(Collectors.toList());
if (allWarnings.size() > 0) {
writer.writeLine("");
writer.writeLine(StringUtils.repeat("*", 60));
if (allWarnings.size() == 1) {
writer.writeLine("WARNING (" + allWarnings.size() + ")");
} else {
writer.writeLine("WARNINGS (" + allWarnings.size() + ")");
}
for (final DetectOption option : allWarnings) {
for (final String warning : option.getWarnings()) {
writer.writeLine(option.getDetectProperty().getPropertyKey() + ": " + warning);
}
}
writer.writeLine(StringUtils.repeat("*", 60));
writer.writeLine("");
}
}
Aggregations