This action parses and validates XML documents with libxml2's
xmllint. Errors are available as JSON and HTML. The action summary will
contain the latter.
---
name: Quality Assurance
on:
pull_request:
push:
branches:
- main
jobs:
xmllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: delb-xml/[email protected]
with:
root_folder: files
...root_folder- files to validate are searched in this directory and its subfolders
- defaults to
.
file_pattern- this globbing filter will be applied to select files to be validated
- defaults to
*.xml
huge_files- if
true, the--hugeoption will be passed toxmllint - defaults to
false
- if
validate- if
true, the--validateoption will be passed toxmllint - requires DTDs to be assigned to each document
- defaults to
false
- if
errors_html- an HTML table that lists all errors
errors_json- a JSON encoded array of error objects with these fields:
file— path of the fileposition— index/column where the error was spottedcategory— eithersyntaxorvaliditymessage— the emitted error messagesnippet— a snippet with a portion of the faulty markup, separated by a newline character the second line contains a caret character that acts as optical pointer
- a JSON encoded array of error objects with these fields:
- generate problem markers, if feasible
- release as Docker image