use of org.gradle.api.reporting.SingleFileReport in project gradle by gradle.
the class FindBugs method evaluateResult.
@VisibleForTesting
void evaluateResult(FindBugsResult result) {
if (result.getException() != null) {
throw new GradleException("FindBugs encountered an error. Run with --debug to get more information.", result.getException());
}
if (result.getErrorCount() > 0) {
throw new GradleException("FindBugs encountered an error. Run with --debug to get more information.");
}
if (result.getBugCount() > 0) {
String message = "FindBugs rule violations were found.";
SingleFileReport report = reports.getFirstEnabled();
if (report != null) {
String reportUrl = new ConsoleRenderer().asClickableFileUrl(report.getDestination());
message += " See the report at: " + reportUrl;
}
if (getIgnoreFailures()) {
getLogger().warn(message);
} else {
throw new GradleException(message);
}
}
}
Aggregations