This commit is contained in:
+2
-10
@@ -19,15 +19,7 @@ jobs:
|
|||||||
- name: Validate XML definitions
|
- name: Validate XML definitions
|
||||||
run: |
|
run: |
|
||||||
if command -v xmllint >/dev/null; then
|
if command -v xmllint >/dev/null; then
|
||||||
for f in $(find . -name '*.xml'); do
|
find . -name '*.xml' -exec xmllint --noout {} +
|
||||||
xmllint --noout "$f"
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
python3 - <<'EOF'
|
python3 -c "import glob, xml.etree.ElementTree as ET; [ET.parse(f) for f in glob.glob('**/*.xml', recursive=True)]"
|
||||||
import glob, xml.etree.ElementTree as ET
|
|
||||||
files = glob.glob('**/*.xml', recursive=True)
|
|
||||||
for f in files:
|
|
||||||
ET.parse(f) # raises on malformed XML
|
|
||||||
print(f"ok: {len(files)} XML files well-formed")
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user