You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2004/01/29 06:34:55 UTC
cvs commit: maven-plugins/checkstyle/src/plugin-resources checkstyle.jsl
dion 2004/01/28 21:34:55
Modified: checkstyle/xdocs changes.xml
checkstyle/src/plugin-resources checkstyle.jsl
Log:
Applied MPCHECKSTYLE-15
Revision Changes Path
1.23 +3 -0 maven-plugins/checkstyle/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/checkstyle/xdocs/changes.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- changes.xml 22 Dec 2003 13:31:23 -0000 1.22
+++ changes.xml 29 Jan 2004 05:34:55 -0000 1.23
@@ -9,6 +9,9 @@
<body>
<release version="2.3" date="in CVS">
+ <action dev="dion" type="update">
+ Applied MPCHECKSTYLE-15
+ </action>
<action dev="vmassol" type="update">
Upgraded to Checkstyle 3.3.
</action>
1.12 +100 -80 maven-plugins/checkstyle/src/plugin-resources/checkstyle.jsl
Index: checkstyle.jsl
===================================================================
RCS file: /home/cvs/maven-plugins/checkstyle/src/plugin-resources/checkstyle.jsl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- checkstyle.jsl 14 Nov 2003 08:17:15 -0000 1.11
+++ checkstyle.jsl 29 Jan 2004 05:34:55 -0000 1.12
@@ -7,7 +7,7 @@
xmlns:util="jelly:util"
xmlns:x="jelly:xml"
xmlns:doc="doc"
- xmlns="dummy" trim="false">
+ xmlns="dummy" trim="true">
<!-- This needs to be instantiated here to be available in the template matches -->
<j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/>
@@ -26,8 +26,7 @@
<section name="Checkstyle Results">
<p>
The following document contains the results of
- <a
- href="http://checkstyle.sourceforge.net/">Checkstyle</a>.
+ <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>.
</p>
</section>
@@ -36,56 +35,64 @@
<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 summary="Report summary">
+ <thead>
+ <tr>
+ <th>Files</th>
+ <th style="width:75px">Infos</th>
+ <th style="width:75px">Warnings</th>
+ <th style="width:75px">Errors</th>
+ </tr>
+ </thead>
+ <tbody>
+ <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>
+ </tbody>
</table>
</section>
<section name="Files">
- <table>
- <tr>
- <th>Files</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()}"/>
- <j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
- <x:set var="files" select="file" sort="@name"/>
- <!-- x:forEach is busted -->
- <j:forEach var="file" items="${files}">
- <!-- Type coercion doesn't work worth a fuck in jexl. -->
- <j:set var="name" value="${file.attribute('name').getValue()}"/>
- <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="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 + 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>
- </j:forEach>
+ <table summary="Files">
+ <thead>
+ <tr>
+ <th>Files</th>
+ <th style="width:30px">I</th>
+ <th style="width:30px">W</th>
+ <th style="width:30px">E</th>
+ </tr>
+ </thead>
+ <tbody>
+ <j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
+ <j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
+ <j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
+ <x:set var="files" select="file" sort="@name"/>
+ <!-- x:forEach is busted -->
+ <j:forEach var="file" items="${files}">
+ <!-- Type coercion doesn't work worth a fuck in jexl. -->
+ <j:set var="name" value="${file.attribute('name').getValue()}"/>
+ <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="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 + 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>
+ </j:forEach>
+ </tbody>
</table>
<j:forEach var="file" items="${files}">
@@ -96,39 +103,52 @@
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
<subsection name="${name}">
- <table>
- <tr>
- <th>Error</th>
- <th width="75">Severity</th>
- <th width="75">Line</th>
- </tr>
- <x:set var="errors" select="$file/error"/>
- <j:forEach var="error" items="${errors}">
+ <table summary="Error details for ${name}">
+ <thead>
<tr>
- <td>
- <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')}"/>
- <j:choose>
- <j:when test="${lastIndex > 0}">
- <j:set var="index" value="${mavenTool.toInteger(lastIndex.toString())}"/>
- <j:set var="nameWithoutJavaExtension" value="${name.substring(0, index)}"/>
- <util:replace var="nameWithoutJavaExtension" value="${nameWithoutJavaExtension}" oldChar="\\" newChar="/"/>
- <a href="xref/${nameWithoutJavaExtension}.html#${line}">${line}</a>
- </j:when>
- <j:otherwise>
- ${line}
- </j:otherwise>
- </j:choose>
- </td>
+ <th colspan="2">Error</th>
+ <th style="width:20px">Line</th>
</tr>
+ </thead>
+ <x:set var="errors" select="$file/error"/>
+ <j:forEach var="error" items="${errors}">
+ <tbody>
+ <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>
+ <j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
+ ${htmlescape.getText(errorMessage)}
+ </td>
+ <td>
+ <j:set var="line" value="${error.attribute('line').getValue()}"/>
+ <j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/>
+ <j:choose>
+ <j:when test="${lastIndex > 0}">
+ <j:set var="index" value="${mavenTool.toInteger(lastIndex.toString())}"/>
+ <j:set var="nameWithoutJavaExtension" value="${name.substring(0, index)}"/>
+ <util:replace var="nameWithoutJavaExtension" value="${nameWithoutJavaExtension}" oldChar="\\" newChar="/"/>
+ <a href="xref/${nameWithoutJavaExtension}.html#${line}">${line}</a>
+ </j:when>
+ <j:otherwise>
+ ${line}
+ </j:otherwise>
+ </j:choose>
+ </td>
+ </tr>
+ </tbody>
</j:forEach>
</table>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org