]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[pre-commit] Make codespell:ignore-begin/end non-greedy
authorTom de Vries <tdevries@suse.de>
Mon, 1 Jun 2026 12:33:48 +0000 (14:33 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 1 Jun 2026 12:33:48 +0000 (14:33 +0200)
The current definition of codespell:ignore-begin/end is greedy and
consequently in this example:
...
/* codespell:ignore-begin */
/* Ignore this: usuable.  */
/* codespell:ignore-end */

/* Don't ignore this: usuable.  */

/* codespell:ignore-begin */
/* Ignore that: usuable.  */
/* codespell:ignore-end */
...
the "Don't ignore this" line will be ignored.

Fix this by making the definition non-greedy.

gdb/contrib/setup.cfg

index 267814c26004c3597150e64d181c3efa603d786a..f6c4635d3c8241c815ef4017c9e23f3fe356c604 100644 (file)
@@ -10,4 +10,4 @@ dictionary = gdb/contrib/codespell-dictionary.txt,-
 uri-ignore-words-list = *
 
 # How to ignore blocks of code.
-ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
+ignore-multiline-regex = codespell:ignore-begin.*?codespell:ignore-end