You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ca...@apache.org on 2005/09/30 04:30:55 UTC
svn commit: r292600 - in /maven/maven-1/plugins/trunk/checkstyle: ./
src/plugin-resources/ src/plugin-test/ xdocs/
Author: carlos
Date: Thu Sep 29 19:30:50 2005
New Revision: 292600
URL: http://svn.apache.org/viewcvs?rev=292600&view=rev
Log:
Added summary report as default
Moved reports to its own checkstyle folder
Added:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl
- copied, changed from r291995, maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl (with props)
Removed:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl
Modified:
maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2ref.jsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2rss.jsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-test/maven.xml
maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml
Modified: maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/plugin.jelly?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/checkstyle/plugin.jelly Thu Sep 29 19:30:50 2005
@@ -229,10 +229,16 @@
<goal name="checkstyle:report-internal" description="Generate xdocs from checkstyle xml report">
+ <mkdir dir="${maven.gen.docs}/checkstyle"/>
+ <style
+ in="${maven.checkstyle.output.xml}"
+ out="${maven.gen.docs}/checkstyle/index.xml"
+ style="${plugin.resources}/checkstyle.xsl"/>
+
<doc:jsl
input="${maven.checkstyle.output.xml}"
- output="checkstyle-report.xml"
- stylesheet="${plugin.resources}/checkstyle.jsl"
+ output="checkstyle/all.xml"
+ stylesheet="${plugin.resources}/checkstyle-all.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
prettyPrint="true"/>
@@ -245,7 +251,7 @@
<!-- Generate a RSS feed of the checktyle errors -->
<doc:jsl
input="${maven.checkstyle.output.xml}"
- output="checkstyle.rss"
+ output="checkstyle/checkstyle.rss"
stylesheet="${plugin.resources}/checkstyle2rss.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
@@ -265,7 +271,7 @@
<doc:registerReport
name="Checkstyle"
pluginName="checkstyle"
- link="checkstyle-report"
+ link="checkstyle/index"
description="Report on coding style conventions."/>
</j:if>
</goal>
@@ -293,7 +299,7 @@
<doc:jsl
input="${maven.checkstyle.output.xml}"
- output="checkstyle-report-${severity}.xml"
+ output="checkstyle/${severity}.xml"
stylesheet="${plugin.resources}/checkstyle_severity_filter.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
Copied: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl (from r291995, maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl)
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl?p2=maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl&p1=maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl&r1=291995&r2=292600&rev=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl Thu Sep 29 19:30:50 2005
@@ -47,17 +47,7 @@
<p>
The following document contains the results of
<a href="http://checkstyle.sourceforge.net/">Checkstyle</a>
- <a href="checkstyle.rss"><img src="images/rss.png"/></a>.
- </p>
- </section>
-
- <section name="Errors filtered by severity">
- <p>
- <ul>
- <li><a href="checkstyle-report-error.html">Error</a></li>
- <li><a href="checkstyle-report-warning.html">Warning</a></li>
- <li><a href="checkstyle-report-info.html">Info</a></li>
- </ul>
+ <a href="checkstyle.rss"><img src="../images/rss.png"/></a>.
</p>
</section>
@@ -149,13 +139,13 @@
<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" />
+ <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" />
+ <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" />
+ <img src="../images/icon_info_sml.gif" width="15" height="15" alt="Info" />
</j:when>
</j:choose>
</td>
@@ -171,7 +161,7 @@
<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>
+ <a href="../xref/${nameWithoutJavaExtension}.html#${line}">${line}</a>
</j:when>
<j:otherwise>
${line}
Added: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl?rev=292600&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl (added)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl Thu Sep 29 19:30:50 2005
@@ -0,0 +1,103 @@
+<!--
+ * ========================================================================
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ========================================================================
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" />
+ <xsl:key name="stvalkey" match="//error" use="@message" />
+ <xsl:template match="/">
+
+ <document>
+
+ <properties>
+ <title>Checkstyle Results</title>
+ </properties>
+
+ <body>
+
+ <section name="Checkstyle Results">
+ <p>
+ The following document contains the results of
+ <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>
+ <a href="checkstyle.rss"><img src="images/rss.png"/></a>.
+ </p>
+ </section>
+
+ <section name="Detailed reports">
+ <p>
+ <ul>
+ <li><a href="all.html">All problems</a></li>
+ <li><a href="error.html">Error level problems</a></li>
+ <li><a href="warning.html">Warning level problems</a></li>
+ <li><a href="info.html">Info level problems</a></li>
+ </ul>
+ </p>
+ </section>
+
+ <section name="Summary">
+ <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><xsl:value-of select="count(//file)" /></td>
+ <td><xsl:value-of select="count(//file/error[@severity='info'])" /></td>
+ <td><xsl:value-of select="count(//file/error[@severity='warning'])" /></td>
+ <td><xsl:value-of select="count(//file/error[@severity='error'])" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+
+ <section name="Checkstyle Error Summary">
+
+ <table>
+ <tr>
+ <th>Error</th>
+ <th>Count</th>
+ </tr>
+ <xsl:for-each select="//error" >
+ <xsl:variable name="tmp" >
+ <xsl:value-of select="./@message" />
+ </xsl:variable>
+ <xsl:if test="generate-id(.) = generate-id(key('stvalkey',$tmp)[1])">
+ <tr>
+ <td><xsl:value-of select="$tmp" /></td>
+ <td><xsl:value-of select="count(key('stvalkey',$tmp))" /></td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+
+ </section>
+
+ </body>
+ </document>
+ </xsl:template>
+
+ <xsl:template match="text()" />
+
+</xsl:stylesheet>
+
Propchange: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2ref.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2ref.jsl?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2ref.jsl (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2ref.jsl Thu Sep 29 19:30:50 2005
@@ -44,7 +44,7 @@
<channel rdf:about="${pom.url}">
<title>Checkstyle report for ${pom.name}</title>
- <link>${pom.url}/checkstyle-report.html</link>
+ <link>${pom.url}/checkstyle/index.html</link>
<description>Checkstyle report for ${pom.name}</description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2rss.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2rss.jsl?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2rss.jsl (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle2rss.jsl Thu Sep 29 19:30:50 2005
@@ -54,12 +54,12 @@
<title>File: ${fileCount}, Errors: ${errorCount}, Warnings: ${warningCount}, Infos: ${infoCount}</title>
<!-- If we don't go through a tmp variable Jelly inserts a space between ${pom.url}
- and '/checkstyle-report.html'. Go figure... -->
- <j:set var="link" value="${pom.url}/checkstyle-report.html"/>
+ and '/checkstyle/index.html'. Go figure... -->
+ <j:set var="link" value="${pom.url}/checkstyle/index.html"/>
<link>${link}</link>
<description>
- <p>Click <a href="${pom.url}/checkstyle-report.html">here</a> for the full Checkstyle report.</p>
+ <p>Click <a href="${pom.url}/checkstyle/index.html">here</a> for the full Checkstyle report.</p>
<table summary="Files" border="1">
<thead>
Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl Thu Sep 29 19:30:50 2005
@@ -64,7 +64,7 @@
<p>
The following document contains the results of
<a href="http://checkstyle.sourceforge.net/">Checkstyle</a>
- <a href="checkstyle.rss"><img src="images/rss.png"/></a>
+ <a href="checkstyle.rss"><img src="../images/rss.png"/></a>
for severity ${severity}.
</p>
</section>
@@ -142,7 +142,7 @@
<tbody>
<tr>
<td style="width:20px">
- <img src="images/icon_${severity}_sml.gif" width="15" height="15" alt="Error" />
+ <img src="../images/icon_${severity}_sml.gif" width="15" height="15" alt="Error" />
</td>
<td>
<j:set var="errorMessage" value="${error.attribute('message').getValue()}"/>
@@ -156,7 +156,7 @@
<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>
+ <a href="../xref/${nameWithoutJavaExtension}.html#${line}">${line}</a>
</j:when>
<j:otherwise>
${line}
Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-test/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-test/maven.xml?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-test/maven.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-test/maven.xml Thu Sep 29 19:30:50 2005
@@ -26,16 +26,27 @@
<goal name="test-checkstyle-report">
<attainGoal name="checkstyle:report"/>
- <assert:assertFileExists file="${maven.gen.docs}/checkstyle-report.xml"/>
+ <assert:assertFileExists file="${maven.gen.docs}/checkstyle/index.xml"/>
+ <assert:assertFileExists file="${maven.gen.docs}/checkstyle/all.xml"/>
+ <assert:assertFileExists file="${maven.gen.docs}/checkstyle/error.xml"/>
+ <assert:assertFileExists file="${maven.gen.docs}/checkstyle/warning.xml"/>
+ <assert:assertFileExists file="${maven.gen.docs}/checkstyle/info.xml"/>
<!-- Verify that there are no Boolean instantiation errors as we have
excluded the SuppressionFilterSample java file from the checks -->
- <util:file var="rawFile" name="${maven.build.dir}/checkstyle-raw-report.xml"/>
+ <util:file var="rawFile" name="${maven.checkstyle.output.xml}"/>
<x:parse var="doc" xml="${rawFile}"/>
<x:if select="$doc//file[contains(@name,'SuppressionFilterSample')]/error[contains(@source,'IllegalInstantiationCheck')]">
<fail>Should not have generated an error as we have a suppression filter set on SuppressionFilterSample</fail>
</x:if>
+
+ <attainGoal name="xdoc"/>
+ <assert:assertFileExists file="${maven.docs.dest}/checkstyle/index.html"/>
+ <assert:assertFileExists file="${maven.docs.dest}/checkstyle/all.html"/>
+ <assert:assertFileExists file="${maven.docs.dest}/checkstyle/error.html"/>
+ <assert:assertFileExists file="${maven.docs.dest}/checkstyle/warning.html"/>
+ <assert:assertFileExists file="${maven.docs.dest}/checkstyle/info.html"/>
</goal>
</project>
Modified: maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml?rev=292600&r1=292599&r2=292600&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml Thu Sep 29 19:30:50 2005
@@ -26,6 +26,8 @@
</properties>
<body>
<release version="3.0-SNAPSHOT" date="in SVN">
+ <action dev="carlos" type="add">Added new summary report as front page.</action>
+ <action dev="carlos" type="update">Moved reports under the checkstyle folder and renamed.</action>
<action dev="carlos" type="update">Added maven.checkstyle.dir and move output files there.</action>
<action dev="carlos" type="add">Added properties maven.checkstyle.output.xml and maven.checkstyle.output.txt</action>
<action dev="aheritier" type="update">It requires at least maven-plugin-plugin v1.7.</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org