[2/2,pre-commit] Check xml files
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
fail
|
Test failed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
fail
|
Patch failed to apply
|
Commit Message
Add a pre-commit check to check xml files (that also includes the .svg file).
This just checks for well-formedness. Ideally we'd check
conformance to dtd as well, but currently only C-based xmllint [1]
seems to provide this.
[1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
---
.pre-commit-config.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
@@ -109,6 +109,19 @@ repos:
- id: yamllint
files: '^\.pre-commit-config.yaml$'
+ # Out-of-the-box hooks.
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v6.0.0
+ hooks:
+ - # This just checks for well-formedness. Ideally we'd check
+ # conformance to dtd as well, but currently only C-based xmllint [1]
+ # seems to provide this.
+ # [1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
+ id: &id5 check-xml
+ name: *id5
+ files: &gdb_xml_files '^(gdb|gdbserver|gdbsupport)/.*\.(xml|xsl|svg)$'
+ exclude: gdb/testsuite/gdb.xml/tdesc-bogus.xml
+
# Local hooks.
- repo: local
hooks: