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:
parent
6982e0f933
commit
aa3a6e65ea
@ -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,56 +35,64 @@
|
|||||||
<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">
|
||||||
<tr>
|
<thead>
|
||||||
<th>Files</th>
|
<tr>
|
||||||
<th width="75">Infos</th>
|
<th>Files</th>
|
||||||
<th width="75">Warnings</th>
|
<th style="width:75px">Infos</th>
|
||||||
<th width="75">Errors</th>
|
<th style="width:75px">Warnings</th>
|
||||||
</tr>
|
<th style="width:75px">Errors</th>
|
||||||
<tr>
|
</tr>
|
||||||
<td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td>
|
</thead>
|
||||||
<td><doc:formatAsNumber string="${infoCount}" pattern="0"/></td>
|
<tbody>
|
||||||
<td><doc:formatAsNumber string="${warningCount}" pattern="0"/></td>
|
<tr>
|
||||||
<td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td>
|
<td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td>
|
||||||
</tr>
|
<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>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="Files">
|
<section name="Files">
|
||||||
<table>
|
<table summary="Files">
|
||||||
<tr>
|
<thead>
|
||||||
<th>Files</th>
|
<tr>
|
||||||
<th width="30">I</th>
|
<th>Files</th>
|
||||||
<th width="30">W</th>
|
<th style="width:30px">I</th>
|
||||||
<th width="30">E</th>
|
<th style="width:30px">W</th>
|
||||||
</tr>
|
<th style="width:30px">E</th>
|
||||||
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
</tr>
|
||||||
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
</thead>
|
||||||
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
<tbody>
|
||||||
<x:set var="files" select="file" sort="@name"/>
|
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
||||||
<!-- x:forEach is busted -->
|
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
||||||
<j:forEach var="file" items="${files}">
|
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
||||||
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
<x:set var="files" select="file" sort="@name"/>
|
||||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
<!-- x:forEach is busted -->
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
<j:forEach var="file" items="${files}">
|
||||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
||||||
<!--- +1 is for the trailing slash above -->
|
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||||
<j:set var="infoCount"><x:expr select="count($file/error[@severity='info'])"/></j:set>
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||||
<j:set var="warningCount"><x:expr select="count($file/error[@severity='warning'])"/></j:set>
|
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||||
<j:set var="errorCount"><x:expr select="count($file/error[@severity='error'])"/></j:set>
|
<!--- +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}">
|
<j:if test="${errorCount + warningCount + infoCount != 0}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="#${name}">${name}</a>
|
<a href="#${name}">${name}</a>
|
||||||
</td>
|
</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>
|
||||||
</j:if>
|
</j:if>
|
||||||
</j:forEach>
|
</j:forEach>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<j:forEach var="file" items="${files}">
|
<j:forEach var="file" items="${files}">
|
||||||
@ -96,39 +103,52 @@
|
|||||||
<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}">
|
||||||
<tr>
|
<thead>
|
||||||
<th>Error</th>
|
<tr>
|
||||||
<th width="75">Severity</th>
|
<th colspan="2">Error</th>
|
||||||
<th width="75">Line</th>
|
<th style="width:20px">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}">
|
||||||
<tr>
|
<tbody>
|
||||||
<td>
|
<tr>
|
||||||
<j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
|
<td style="width:20px">
|
||||||
${htmlescape.getText(errorMessage)}
|
<j:set var="severity" value="${error.attribute('severity').getValue()}"/>
|
||||||
</td>
|
<j:choose>
|
||||||
<td>
|
<j:when test="${severity == 'error'}">
|
||||||
<j:set var="severity" value="${error.attribute('severity').getValue()}"/>
|
<img src="images/icon_error_sml.gif" width="15" height="15" alt="Error" />
|
||||||
${htmlescape.getText(severity)}
|
</j:when>
|
||||||
</td>
|
<j:when test="${severity == 'warning'}">
|
||||||
<td>
|
<img src="images/icon_warning_sml.gif" width="15" height="15" alt="Warning" />
|
||||||
<j:set var="line" value="${error.attribute('line').getValue()}"/>
|
</j:when>
|
||||||
<j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/>
|
<j:when test="${severity == 'info'}">
|
||||||
<j:choose>
|
<img src="images/icon_info_sml.gif" width="15" height="15" alt="Info" />
|
||||||
<j:when test="${lastIndex > 0}">
|
</j:when>
|
||||||
<j:set var="index" value="${mavenTool.toInteger(lastIndex.toString())}"/>
|
</j:choose>
|
||||||
<j:set var="nameWithoutJavaExtension" value="${name.substring(0, index)}"/>
|
</td>
|
||||||
<util:replace var="nameWithoutJavaExtension" value="${nameWithoutJavaExtension}" oldChar="\\" newChar="/"/>
|
<td>
|
||||||
<a href="xref/${nameWithoutJavaExtension}.html#${line}">${line}</a>
|
<j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
|
||||||
</j:when>
|
${htmlescape.getText(errorMessage)}
|
||||||
<j:otherwise>
|
</td>
|
||||||
${line}
|
<td>
|
||||||
</j:otherwise>
|
<j:set var="line" value="${error.attribute('line').getValue()}"/>
|
||||||
</j:choose>
|
<j:set var="lastIndex" value="${name.lastIndexOf('.java')}"/>
|
||||||
</td>
|
<j:choose>
|
||||||
</tr>
|
<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>
|
</j:forEach>
|
||||||
</table>
|
</table>
|
||||||
</subsection>
|
</subsection>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user