Applied patch from Henri Tremblay for <a href="http://jira.codehaus.org/secure/ViewIssue.jspa?id=12696">MAVEN-1036</a>. The Checkstyle HTML report now provides information on severity.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol
2003-11-14 08:17:15 +00:00
parent d8034b7779
commit a2368107fc
2 changed files with 26 additions and 4 deletions

View File

@@ -33,14 +33,20 @@
<section name="Summary">
<j:set var="fileCount"><x:expr select="count(file)"/></j:set>
<j:set var="errorCount"><x:expr select="count(file/error)"/></j:set>
<j:set var="infoCount"><x:expr select="count(file/error[@severity='info'])"/></j:set>
<j:set var="warningCount"><x:expr select="count(file/error[@severity='warning'])"/></j:set>
<j:set var="errorCount"><x:expr select="count(file/error[@severity='error'])"/></j:set>
<table>
<tr>
<th>Files</th>
<th width="75">Infos</th>
<th width="75">Warnings</th>
<th width="75">Errors</th>
</tr>
<tr>
<td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${infoCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${warningCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td>
</tr>
</table>
@@ -50,7 +56,9 @@
<table>
<tr>
<th>Files</th>
<th width="75">Errors</th>
<th width="30">I</th>
<th width="30">W</th>
<th width="30">E</th>
</tr>
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
@@ -63,13 +71,17 @@
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
<!--- +1 is for the trailing slash above -->
<j:set var="errorCount"><x:expr select="count($file/error)"/></j:set>
<j:set var="infoCount"><x:expr select="count($file/error[@severity='info'])"/></j:set>
<j:set var="warningCount"><x:expr select="count($file/error[@severity='warning'])"/></j:set>
<j:set var="errorCount"><x:expr select="count($file/error[@severity='error'])"/></j:set>
<j:if test="${errorCount != 0}">
<j:if test="${errorCount + warningCount + infoCount != 0}">
<tr>
<td>
<a href="#${name}">${name}</a>
</td>
<td><doc:formatAsNumber string="${infoCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${warningCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td>
</tr>
</j:if>
@@ -87,6 +99,7 @@
<table>
<tr>
<th>Error</th>
<th width="75">Severity</th>
<th width="75">Line</th>
</tr>
<x:set var="errors" select="$file/error"/>
@@ -96,6 +109,10 @@
<j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
${htmlescape.getText(errorMessage)}
</td>
<td>
<j:set var="severity" value="${error.attribute('severity').getValue()}"/>
${htmlescape.getText(severity)}
</td>
<td>
<j:set var="line" value="${error.attribute('line').getValue()}"/>
<j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/>

View File

@@ -9,6 +9,11 @@
<body>
<release version="2.2" date="in CVS">
<action dev="vmassol" type="fix">
Applied patch from Henri Tremblay for
<a href="http://jira.codehaus.org/secure/ViewIssue.jspa?id=12696">MAVEN-1036</a>.
The Checkstyle HTML report now provides information on severity.
</action>
<action dev="vmassol" type="fix">
Prevent projects who do not use the head check from failing if they
don't provide a license file.