Add wiki link with error explaination to failure message. Useful for viewers that show the message, but not the source like the gitlab merge request viewer.

Alex Ives
2018-12-12 16:36:05 -06:00
parent 9a18e465a4
commit d1b98ebb93

@@ -23,8 +23,8 @@ Here it is with the XSLT applied using `xmlstarlet`:
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testsuite tests="2" failures="2"> <testsuite tests="2" failures="2">
<testcase classname="foo.bash" name="foo.bash"> <testcase classname="foo.bash" name="foo.bash">
<failure type="ShellCheck.SC2148">Line 1: Tips depend on target shell and yours is unknown. Add a shebang.</failure> <failure type="ShellCheck.SC2148">Line 1: Tips depend on target shell and yours is unknown. Add a shebang. See https://www.shellcheck.net/wiki/SC2148</failure>
<failure type="ShellCheck.SC2086">Line 1: Double quote to prevent globbing and word splitting.</failure> <failure type="ShellCheck.SC2086">Line 1: Double quote to prevent globbing and word splitting. See https://www.shellcheck.net/wiki/SC2086</failure>
</testcase> </testcase>
<testcase classname="bar.bash" name="bar.bash"> <testcase classname="bar.bash" name="bar.bash">
</testcase> </testcase>
@@ -71,6 +71,8 @@ Here it is with the XSLT applied using `xmlstarlet`:
<xsl:value-of select="@line" /> <xsl:value-of select="@line" />
<xsl:text>: </xsl:text> <xsl:text>: </xsl:text>
<xsl:value-of select="@message" /> <xsl:value-of select="@message" />
<xsl:text> - See https://www.shellcheck.net/wiki/</xsl:text>
<xsl:value-of select="substring(@source, '12')" />
</failure> </failure>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>