From: Tom de Vries Date: Sat, 26 Apr 2025 07:49:49 +0000 (+0200) Subject: [gdb/contrib] Add codespell:ignore-begin/ignore-end (disabled) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f9b303e68d1e5b48b253b0a215ef7761422fb8a;p=thirdparty%2Fbinutils-gdb.git [gdb/contrib] Add codespell:ignore-begin/ignore-end (disabled) 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. --- diff --git a/gdb/contrib/setup.cfg b/gdb/contrib/setup.cfg index 670a85064e2..d6be386a588 100644 --- a/gdb/contrib/setup.cfg +++ b/gdb/contrib/setup.cfg @@ -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