Split messages by severity
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@293477 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a9f062057b
commit
161d2ff233
@ -71,32 +71,47 @@
|
|||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="Checkstyle Error Summary">
|
<xsl:apply-templates select="." mode="count">
|
||||||
|
<xsl:with-param name="severity">error</xsl:with-param>
|
||||||
<table>
|
</xsl:apply-templates>
|
||||||
<tr>
|
<xsl:apply-templates select="." mode="count">
|
||||||
<th>Error</th>
|
<xsl:with-param name="severity">warning</xsl:with-param>
|
||||||
<th>Count</th>
|
</xsl:apply-templates>
|
||||||
</tr>
|
<xsl:apply-templates select="." mode="count">
|
||||||
<xsl:for-each select="//error" >
|
<xsl:with-param name="severity">info</xsl:with-param>
|
||||||
<xsl:variable name="tmp" >
|
</xsl:apply-templates>
|
||||||
<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>
|
</body>
|
||||||
</document>
|
</document>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="/" mode="count">
|
||||||
|
<xsl:param name="severity"/>
|
||||||
|
|
||||||
|
<xsl:element name="section">
|
||||||
|
<xsl:attribute name="name">Checkstyle <xsl:value-of select="$severity"/> Summary</xsl:attribute>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Error</th>
|
||||||
|
<th>Count</th>
|
||||||
|
</tr>
|
||||||
|
<xsl:for-each select="//error[@severity=$severity]" >
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="text()" />
|
<xsl:template match="text()" />
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user