From 30bee814f7dbd415fc02cf7a28881df03dd62b96 Mon Sep 17 00:00:00 2001 From: Stefan de Konink Date: Fri, 21 Feb 2025 10:51:06 +0100 Subject: [PATCH] Ignore local .git folder --- .github/scripts/validate-and-lint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/scripts/validate-and-lint.sh b/.github/scripts/validate-and-lint.sh index cfb5d5f..4088cf4 100755 --- a/.github/scripts/validate-and-lint.sh +++ b/.github/scripts/validate-and-lint.sh @@ -12,6 +12,9 @@ echo "Validating XML file structure and linting XSD and XML files ..." PARSING_ERROR=0 # Iterate all XML and XSD files while IFS= read -r -d $'\0' filename; do + if [[ "$filename" =~ \.git/ ]]; then + continue # Skip files inside the .git directory + fi # Prettify the file using xmllint and save the result to ${filename}.pretty if XMLLINT_INDENT=$'\t' xmllint --encode UTF-8 --pretty 1 "${filename}" >"${filename}.pretty"; then # Remove lines containing the term "xmlspy" to get rid of advertising this and save the result as ${filename}