From 76d37755c9b5d2fbd73bbeabf179d03b291f5151 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 18 Jul 2015 15:28:08 -0700 Subject: [PATCH] Created JUnit (markdown) --- JUnit.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 JUnit.md diff --git a/JUnit.md b/JUnit.md new file mode 100644 index 0000000..e874e49 --- /dev/null +++ b/JUnit.md @@ -0,0 +1,76 @@ +## Getting JUnit XML from ShellCheck + +ShellCheck does not have a JUnit XML formatter, but here you can find `checkstyle2junit.xslt`, a XSLT program that converts from Checkstyle XML output to JUnit XML. + +Here's shellcheck's checkstyle XML output: + + $ shellcheck -f checkstyle foo.bash bar.bash + + + + + + + + + + + +Here it is with the XSLT applied using `xmlstarlet`: + + $ shellcheck -f checkstyle foo.bash bar.bash | xmlstarlet tr checkstyle2junit.xslt + + + + + Line 1: Tips depend on target shell and yours is unknown. Add a shebang. + Line 1: Double quote to prevent globbing and word splitting. + + + + + +`checkstyle2junit.xslt` : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Line + + : + + + + \ No newline at end of file