From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] [pre-commit] Check xml files
Date: Wed, 26 Aug 2026 10:30:40 +0200 [thread overview]
Message-ID: <20260826083040.1702439-3-tdevries@suse.de> (raw)
In-Reply-To: <20260826083040.1702439-1-tdevries@suse.de>
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(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 53e4c5033c1..db788b187f9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -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:
--
2.51.0
prev parent reply other threads:[~2026-08-26 8:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 8:30 [PATCH 0/2] [gdb] xml linting Tom de Vries
2026-08-26 8:30 ` [PATCH 1/2] [gdb] Fix xmllint namespace errors Tom de Vries
2026-08-26 10:29 ` Tom de Vries
2026-08-26 14:55 ` Tom de Vries
2026-08-26 8:30 ` Tom de Vries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826083040.1702439-3-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox