Skip to content

Commit

Permalink
Update #607, table formatted report
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Nov 2, 2022
1 parent 361312d commit 22c73ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/scripts/cppcheck-xml2text.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
| error | warning | style | performance | portability | information |
| --- | --- | --- | --- | --- | --- |
| <xsl:value-of select="count(//error[@severity='error'])"/> | <xsl:value-of select="count(//error[@severity='warning'])"/> | <xsl:value-of select="count(//error[@severity='style'])"/> | <xsl:value-of select="count(//error[@severity='performance'])"/> | <xsl:value-of select="count(//error[@severity='portability'])"/> | <xsl:value-of select="count(//error[@severity='information'])"/> |
<xsl:for-each select="results//error">
[<xsl:value-of select="@severity"/>] <xsl:value-of select="location/@file"/>:<xsl:value-of select="location/@line"/>, <xsl:value-of select="@msg"/>

| severity | file | line | issue |
| --- | --- | --- | --- |
<xsl:for-each select="results//error">| <xsl:value-of select="@severity"/> | <xsl:value-of select="location/@file"/> | <xsl:value-of select="location/@line"/> | <xsl:value-of select="@msg"/> |
</xsl:for-each>
<xsl:text>&#xa;</xsl:text> <!-- force adding a newline -->
</xsl:if>
** <xsl:value-of select="count(//error)"/> error(s) reported **
**<xsl:value-of select="count(//error)"/> error(s) reported**
</xsl:template>
</xsl:stylesheet>
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ jobs:
path: ./*cppcheck_err.*

- name: Check for reported errors
run: tail -n 1 cppcheck_err.txt | grep -q '^\*\* 0 error(s) reported \*\*$'
run: tail -n 1 cppcheck_err.txt | grep -q '^\*\*0 error(s) reported\*\*$'

0 comments on commit 22c73ce

Please sign in to comment.