private void printViolations(Violations violations, PrintWriter out) {
        out.println("Violations found:");
        if (violations.hasViolations()) {
            for (Violation violation : violations.asList()) {
                out.println(" - " + violation);
            }
        } else {
            out.println(" - No violations found.");
        }
    }
private void printViolations ( Violations violations , PrintWriter out ) { out . println ( "Violations found:" ) ; if ( violations . hasViolations ( ) ) { for ( Violation violation : violations . asList ( ) ) { out . println ( " - " + violation ) ; } } else { out . println ( " - No violations found." ) ; } }
Writes the part where all {@link Violations} that were found are listed.

@param violations {@link Violations} that were found
@param out        target where the report is written to