From 751dddc707baf1ff3c0a2b27c0e8abfd594c6b2f Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 22 Dec 2021 16:06:36 +1100 Subject: [PATCH] Fix caps and highlight embedded code-blocks --- JUnit.md | 137 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 71 insertions(+), 66 deletions(-) diff --git a/JUnit.md b/JUnit.md index 2b71c01..c9a6fc4 100644 --- a/JUnit.md +++ b/JUnit.md @@ -1,78 +1,83 @@ ## 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. +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. -Here's shellcheck's checkstyle XML output: +Here's ShellCheck's (CheckStyle-compatible) XML output: - $ shellcheck -f checkstyle foo.bash bar.bash +```console +$ 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 +```console +$ 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. See https://www.shellcheck.net/wiki/SC2148 - Line 1: Double quote to prevent globbing and word splitting. See https://www.shellcheck.net/wiki/SC2086 - - - + + + +Line 1: Tips depend on target shell and yours is unknown. Add a shebang. See https://www.shellcheck.net/wiki/SC2148 +Line 1: Double quote to prevent globbing and word splitting. See https://www.shellcheck.net/wiki/SC2086 + + + + +``` + +`checkstyle2junit.xslt`: +```xslt + + + + + + + + + + + + + + + + -`checkstyle2junit.xslt` : + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Line - - : - - See https://www.shellcheck.net/wiki/ - - - - \ No newline at end of file + + + + + + Line + + : + + See https://www.shellcheck.net/wiki/ + + + + +```