-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathcheckstyle-text.xsl
26 lines (22 loc) · 985 Bytes
/
checkstyle-text.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes"/>
<xsl:template match="/">
Coding Style Check Results
--------------------------
Total files checked: <xsl:number level="any" value="count(descendant::file)"/>
Files with errors: <xsl:number level="any" value="count(descendant::file[error])"/>
Total errors: <xsl:number level="any" value="count(descendant::error)"/>
Errors per file: <xsl:number level="any" value="count(descendant::error) div count(descendant::file)"/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="file[error]">
File: <xsl:value-of select="@name"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="error"/>
</xsl:template>
<xsl:template match="error">
<xsl:value-of select="@line"/>:<xsl:value-of select="@column"/><xsl:text> - </xsl:text><xsl:value-of select="@message"/><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>