From 2a26be15859e76d0af17c4150b19336d90be1cc9 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Tue, 2 Apr 2024 16:26:18 +0100 Subject: [PATCH] Include xmllint checks --- .github/workflows/check-build-actions.yml | 2 ++ scripts/test-ancillary-files.sh | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/check-build-actions.yml b/.github/workflows/check-build-actions.yml index 53a8e303..b1d541ec 100644 --- a/.github/workflows/check-build-actions.yml +++ b/.github/workflows/check-build-actions.yml @@ -28,6 +28,7 @@ jobs: - run: sudo apt-get install desktop-file-utils - run: sudo apt-get install gettext - run: sudo apt-get install libgtk-3-bin + - run: sudo apt-get install libxml2-utils - run: sudo apt-get install shellcheck - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -96,6 +97,7 @@ jobs: - run: sudo apt-get install libunwind-dev - run: sudo apt-get install libwebp-dev - run: sudo apt-get install libwebp7 + - run: sudo apt-get install libxml2-utils - run: sudo apt-get install pandoc - run: sudo apt-get install shellcheck #~ - run: sudo apt-get install libffmpegthumbnailer-dev diff --git a/scripts/test-ancillary-files.sh b/scripts/test-ancillary-files.sh index 4aef3788..c15cf3f9 100755 --- a/scripts/test-ancillary-files.sh +++ b/scripts/test-ancillary-files.sh @@ -29,6 +29,7 @@ ## desktop ## scripts ## ui +## xml ## cd "$1" || exit 1 @@ -238,4 +239,25 @@ else printf "%s: appstreamcli in org.geeqie.Geeqie.appdata.xml.in: \n%s\n" "$status" "$result" fi +# xml files lint +if [ -z "$(command -v xmllint)" ] +then + printf "ERROR: xmllint is not installed" + exit_status=1 +else + while read -r line + do + if [ -n "$line" ] + then + if ! xmllint --quiet --nowarning "$line" > /dev/null + then + printf "ERROR: xmllint error in: %s\n" "$line" + exit_status=1 + fi + fi + done << EOF +$(find ./doc/docbook -name "*.xml") +EOF +fi + exit "$exit_status" -- 2.20.1