Applied MPCHECKSTYLE-15

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion 2004-01-29 05:34:55 +00:00
parent 6982e0f933
commit aa3a6e65ea
2 changed files with 103 additions and 80 deletions

View File

@ -7,7 +7,7 @@
xmlns:util="jelly:util" xmlns:util="jelly:util"
xmlns:x="jelly:xml" xmlns:x="jelly:xml"
xmlns:doc="doc" xmlns:doc="doc"
xmlns="dummy" trim="false"> xmlns="dummy" trim="true">
<!-- This needs to be instantiated here to be available in the template matches --> <!-- This needs to be instantiated here to be available in the template matches -->
<j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/> <j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/>
@ -26,8 +26,7 @@
<section name="Checkstyle Results"> <section name="Checkstyle Results">
<p> <p>
The following document contains the results of The following document contains the results of
<a <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>.
href="http://checkstyle.sourceforge.net/">Checkstyle</a>.
</p> </p>
</section> </section>
@ -36,30 +35,37 @@
<j:set var="infoCount"><x:expr select="count(file/error[@severity='info'])"/></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="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:set var="errorCount"><x:expr select="count(file/error[@severity='error'])"/></j:set>
<table> <table summary="Report summary">
<thead>
<tr> <tr>
<th>Files</th> <th>Files</th>
<th width="75">Infos</th> <th style="width:75px">Infos</th>
<th width="75">Warnings</th> <th style="width:75px">Warnings</th>
<th width="75">Errors</th> <th style="width:75px">Errors</th>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td> <td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${infoCount}" pattern="0"/></td> <td><doc:formatAsNumber string="${infoCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${warningCount}" pattern="0"/></td> <td><doc:formatAsNumber string="${warningCount}" pattern="0"/></td>
<td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td> <td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td>
</tr> </tr>
</tbody>
</table> </table>
</section> </section>
<section name="Files"> <section name="Files">
<table> <table summary="Files">
<thead>
<tr> <tr>
<th>Files</th> <th>Files</th>
<th width="30">I</th> <th style="width:30px">I</th>
<th width="30">W</th> <th style="width:30px">W</th>
<th width="30">E</th> <th style="width:30px">E</th>
</tr> </tr>
</thead>
<tbody>
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/> <j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/> <j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/> <j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
@ -86,6 +92,7 @@
</tr> </tr>
</j:if> </j:if>
</j:forEach> </j:forEach>
</tbody>
</table> </table>
<j:forEach var="file" items="${files}"> <j:forEach var="file" items="${files}">
@ -96,23 +103,35 @@
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/> <util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
<subsection name="${name}"> <subsection name="${name}">
<table> <table summary="Error details for ${name}">
<thead>
<tr> <tr>
<th>Error</th> <th colspan="2">Error</th>
<th width="75">Severity</th> <th style="width:20px">Line</th>
<th width="75">Line</th>
</tr> </tr>
</thead>
<x:set var="errors" select="$file/error"/> <x:set var="errors" select="$file/error"/>
<j:forEach var="error" items="${errors}"> <j:forEach var="error" items="${errors}">
<tbody>
<tr> <tr>
<td style="width:20px">
<j:set var="severity" value="${error.attribute('severity').getValue()}"/>
<j:choose>
<j:when test="${severity == 'error'}">
<img src="images/icon_error_sml.gif" width="15" height="15" alt="Error" />
</j:when>
<j:when test="${severity == 'warning'}">
<img src="images/icon_warning_sml.gif" width="15" height="15" alt="Warning" />
</j:when>
<j:when test="${severity == 'info'}">
<img src="images/icon_info_sml.gif" width="15" height="15" alt="Info" />
</j:when>
</j:choose>
</td>
<td> <td>
<j:set var="errorMessage" value="${error.attribute('message').getValue()}"/> <j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
${htmlescape.getText(errorMessage)} ${htmlescape.getText(errorMessage)}
</td> </td>
<td>
<j:set var="severity" value="${error.attribute('severity').getValue()}"/>
${htmlescape.getText(severity)}
</td>
<td> <td>
<j:set var="line" value="${error.attribute('line').getValue()}"/> <j:set var="line" value="${error.attribute('line').getValue()}"/>
<j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/> <j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/>
@ -129,6 +148,7 @@
</j:choose> </j:choose>
</td> </td>
</tr> </tr>
</tbody>
</j:forEach> </j:forEach>
</table> </table>
</subsection> </subsection>

View File

@ -9,6 +9,9 @@
<body> <body>
<release version="2.3" date="in CVS"> <release version="2.3" date="in CVS">
<action dev="dion" type="update">
Applied MPCHECKSTYLE-15
</action>
<action dev="vmassol" type="update"> <action dev="vmassol" type="update">
Upgraded to Checkstyle 3.3. Upgraded to Checkstyle 3.3.
</action> </action>