This is a pre-commit hook feeding all files through xmllint. 'xmllint' command is assumed to exists in command path (please use alias if you don't want to have command in a path, or modify the hook).
format-xmllint overwrites malformed files with reformated file.
check-xmllint hook runs xmllint --format and fails if any modified file
doesn't match xmllint --format output. We don't advise to use that option.
Create or add following to .pre-commit-config.yaml in repository you would like to check:
repos:
- repo: https://github.com/lsst-ts/pre-commit-xmllint
rev: v1.0.0
hooks:
- id: format-xmllint
and install the hook:
pre-commit install