Author: fgiust Date: Fri Dec 30 08:46:16 2005 New Revision: 360118 URL: http://svn.apache.org/viewcvs?rev=360118&view=rev Log: don't add sections for files without warnings
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java?rev=360118&r1=360117&r2=360118&view=diff ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java (original) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java Fri Dec 30 08:46:16 2005 @@ -520,7 +520,12 @@ for( Iterator files = results.getFiles().keySet().iterator(); files.hasNext(); ) { String filename = (String) files.next(); - List violations = (List) results.getFileViolations( filename ); + List violations = results.getFileViolations( filename ); + if ( violations.isEmpty() ) + { + // skip files without violations + continue; + } sink.tableRow(); @@ -557,7 +562,13 @@ while ( files.hasNext() ) { String file = (String) files.next(); - List violations = (List) results.getFileViolations( file ); + List violations = results.getFileViolations( file ); + + if ( violations.isEmpty() ) + { + // skip files without violations + continue; + } doxiaHack(); sink.section1();