[gdb/contrib] Add codespell:ignore-begin/ignore-end (disabled)
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
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 ignore-multiline-regex where using -w in
combination with a file containing such a pattern drops all newlines.
In absence of a fix, commit this solution disabled, to locally document the
current state of this feature.
---
gdb/contrib/setup.cfg | 9 +++++++++
1 file changed, 9 insertions(+)
base-commit: 2cec91421e603699aa8f446d1ae44e873c4965f8
@@ -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 file (
+# 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