]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/contrib] Add codespell:ignore-begin/ignore-end (disabled)
authorTom de Vries <tdevries@suse.de>
Sat, 26 Apr 2025 07:49:49 +0000 (09:49 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 26 Apr 2025 07:49:49 +0000 (09:49 +0200)
It would be useful to tell codespell to ignore blocks of code.

A feature ignore-multiline-regex exists, which can be used to implement this:
...
$ codespell --ignore-multiline-regex \
    'codespell:ignore-begin.*codespell:ignore-end'
...

Unfortunately there's a bug in codespell where using -w in
combination with --ignore-multiline-regex drops all newlines in the updated
file.

In absence of a fix, commit this solution disabled, to locally document the
current state of this feature.

gdb/contrib/setup.cfg

index 670a85064e2f4dbfe40e3b97e3608cf7dabcd92f..d6be386a588139cd43908fce849843a83621311f 100644 (file)
@@ -7,3 +7,12 @@ ignore-words = gdb/contrib/codespell-ignore-words.txt
 
 # Ignore all URLs.
 uri-ignore-words-list = *
+
+# This codespell issue (
+# https://github.com/codespell-project/codespell/issues/3381 ) reports the
+# need to have support for ignoring blocks of code.
+# A suggestion there is to use ignore-multiline-regex, which does work, but
+# has a bug: using -w drops all newlines in the updated files (
+# https://github.com/codespell-project/codespell/issues/3642 ).
+# Consequently, disabled.  To be enabled when the bug is fixed.
+#ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end