mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
cosmetic
5
JUnit.md
5
JUnit.md
@@ -1,6 +1,6 @@
|
|||||||
## Getting JUnit XML from ShellCheck
|
## Getting JUnit XML from ShellCheck
|
||||||
|
|
||||||
ShellCheck does not have a JUnit XML formatter, but here you can find `checkstyle2junit.xslt`, an XSLT program that converts from CheckStyle's XML output to JUnit's XML.
|
ShellCheck does not have a JUnit XML formatter, but [at the end of this article](#checkstyle2junitxslt) you can find `checkstyle2junit.xslt`, an XSLT program that converts from CheckStyle's XML output to JUnit's XML.
|
||||||
|
|
||||||
Here's ShellCheck's (CheckStyle-compatible) XML output:
|
Here's ShellCheck's (CheckStyle-compatible) XML output:
|
||||||
|
|
||||||
@@ -34,7 +34,8 @@ $ shellcheck -f checkstyle foo.bash bar.bash | xmlstarlet tr checkstyle2junit.xs
|
|||||||
</testsuite>
|
</testsuite>
|
||||||
```
|
```
|
||||||
|
|
||||||
`checkstyle2junit.xslt`:
|
### `checkstyle2junit.xslt`
|
||||||
|
|
||||||
```xslt
|
```xslt
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
Reference in New Issue
Block a user