private String getMessage()

in src/main/java/org/apache/maven/plugins/pmd/AbstractPmdViolationCheckMojo.java [239:273]


    private String getMessage(
            final int failureCount,
            final int warningCount,
            final String analyzerName,
            final String failureName,
            final File outputFile) {
        final StringBuilder message = new StringBuilder(256);
        if (failureCount > 0 || warningCount > 0) {
            if (failureCount > 0) {
                message.append(analyzerName)
                        .append(" ")
                        .append(AbstractPmdReport.getPmdVersion())
                        .append(" has found ")
                        .append(failureCount)
                        .append(" ")
                        .append(failureName)
                        .append(failureCount > 1 ? "s" : "");
            }

            if (warningCount > 0) {
                if (failureCount > 0) {
                    message.append(" and issued ");
                } else {
                    message.append(analyzerName)
                            .append(" ")
                            .append(AbstractPmdReport.getPmdVersion())
                            .append(" has issued ");
                }
                message.append(warningCount).append(" warning").append(warningCount > 1 ? "s" : "");
            }

            message.append(". For more details see: ").append(outputFile.getAbsolutePath());
        }
        return message.toString();
    }