Mike Dodd | d3b009a | 2015-08-11 11:16:59 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright (C) 2015 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 17 | <xsl:output method="text" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/> |
| 18 | <xsl:template match="/issues"> |
| 19 | <xsl:for-each select="issue"> |
| 20 | <!-- Exclude errors/warnings with |
| 21 | /android/support in the location, these are outside our control |
| 22 | /com/google/common in the location, these are outside our control |
| 23 | res/values- in the location, these are localized resources, and we only need to be notified of the neutral resource issues |
| 24 | .class in the location, these don't have source we can do anything about --> |
| 25 | <xsl:if test="not(./location) or (not(contains(./location/@file, '/android/support/')) and not(contains(./location/@file, '/com/google/common/')) and not(starts-with(./location/@file, 'res/values-')) and not(contains(./location/@file, '.class')))"> |
| 26 | <xsl:value-of select="@severity" />: <xsl:value-of select="@message" disable-output-escaping="yes"/><xsl:text> </xsl:text>[<xsl:value-of select="@id" />]<xsl:text>
</xsl:text> |
| 27 | <xsl:for-each select="./location"> |
| 28 | <xsl:text> </xsl:text><xsl:value-of select="@file" /> |
| 29 | <xsl:if test="@line"> |
| 30 | <xsl:text>:</xsl:text><xsl:value-of select="@line" /> |
| 31 | <xsl:if test="@column"> |
| 32 | <xsl:text>,</xsl:text><xsl:value-of select="@column" /> |
| 33 | </xsl:if> |
| 34 | </xsl:if> |
| 35 | <xsl:text>
</xsl:text> |
| 36 | </xsl:for-each> |
| 37 | </xsl:if> |
| 38 | </xsl:for-each> |
| 39 | </xsl:template> |
| 40 | </xsl:stylesheet> |