Files
maven-plugins/checkstyle/src/plugin-resources/checkstyle-summary.jsl
T

55 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* ========================================================================
*
* Copyright 2006 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.
*
* ========================================================================
-->
<jsl:stylesheet
select="$doc"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:x="jelly:xml"
xmlns="dummy" trim="true">
<jsl:template match="/">
<errors>
<x:forEach select="//error" sort="@message">
<j:set var="group-by"><x:expr select="./@message"/></j:set>
<x:set var="grstring" select="string(./@message)"/>
<j:if test="${!grstring.equals(oldgrstring)}">
<x:element name="error">
<x:attribute name="severity">
<x:expr select="./@severity"/>
</x:attribute>
<x:attribute name="message">
<x:expr select="$group-by"/>
</x:attribute>
<x:attribute name="count">
<x:expr select="count(//error[@message=$group-by])"/>
</x:attribute>
</x:element>
<x:set var="oldgrstring" select="string(./@message)"/>
</j:if>
</x:forEach>
</errors>
</jsl:template>
<jsl:template match="text()"/>
</jsl:stylesheet>