From a26db6d34d51090d35ad15a57ce619afdec2e9eb Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Fri, 9 Feb 2024 18:44:30 +0100 Subject: [PATCH] feat: lint xsd files (#5250) Lint XSD files with xmllint Close #5248 --- lib/functions/buildFileList.sh | 3 ++- test/linters/xml/xsd_bad_1.xsd | 7 +++++++ test/linters/xml/xsd_good_1.xsd | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/linters/xml/xsd_bad_1.xsd create mode 100644 test/linters/xml/xsd_good_1.xsd diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 12765e3e..c1643669 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -471,7 +471,8 @@ BuildFileArrays() { echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-TSX" elif [ "${FILE_TYPE}" == "txt" ]; then echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-TXT" - elif [ "${FILE_TYPE}" == "xml" ]; then + elif [ "${FILE_TYPE}" == "xml" ] || + [ "${FILE_TYPE}" == "xsd" ]; then echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-XML" elif [ "${FILE_TYPE}" == "yml" ] || [ "${FILE_TYPE}" == "yaml" ]; then echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-YAML" diff --git a/test/linters/xml/xsd_bad_1.xsd b/test/linters/xml/xsd_bad_1.xsd new file mode 100644 index 00000000..6949269f --- /dev/null +++ b/test/linters/xml/xsd_bad_1.xsd @@ -0,0 +1,7 @@ + + + diff --git a/test/linters/xml/xsd_good_1.xsd b/test/linters/xml/xsd_good_1.xsd new file mode 100644 index 00000000..69e4877d --- /dev/null +++ b/test/linters/xml/xsd_good_1.xsd @@ -0,0 +1,6 @@ + + +