Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] [gdb] Document word regexp choice in pyproject.toml
@ 2026-09-04 17:39 Tom de Vries
  2026-09-04 17:39 ` [PATCH 2/2] [gdb] Fix some typos Tom de Vries
  0 siblings, 1 reply; 4+ messages in thread
From: Tom de Vries @ 2026-09-04 17:39 UTC (permalink / raw)
  To: gdb-patches

The codespell tool has an option regex that can be used to control what it
considered a word.

An open question is whether dropping dash or underscore from that regexp is a
good tradeoff in terms of amount of true and false positives.

Document this issue in detail in pyproject.toml.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34241
---
 gdb/pyproject.toml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml
index 47704bb0048..32f14f13f3e 100644
--- a/gdb/pyproject.toml
+++ b/gdb/pyproject.toml
@@ -151,3 +151,13 @@ ignore-multiline-regex = 'codespell:ignore-begin.*?codespell:ignore-end'
 # Add 1 (disable warnings about wrong encoding) in addition to the default
 # 2+32 to skip warnings about iso-8859-1 encoded files.
 quiet-level = 35 # 1+2+32
+
+# For regex we currently use the default value, which since v2.2.6 corresponds
+# to: regex = '''[A-Za-z0-9_'’-]+''' .
+#
+# Dropping the underscore or dash exposes us to more true and false positives.
+# It remains to be seen whether that's a good tradeoff.
+#
+# A related issue ( https://github.com/codespell-project/codespell/issues/1508
+# ) is the fact that using a non-default regex is not compatible with -w, which
+# is a convenient way to fix codespell errors.

base-commit: 881f1e8384b69f2dcf832b29eb7cf8fe7a1fae1a
-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-09 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 17:39 [PATCH 1/2] [gdb] Document word regexp choice in pyproject.toml Tom de Vries
2026-09-04 17:39 ` [PATCH 2/2] [gdb] Fix some typos Tom de Vries
2026-09-04 19:45   ` Eli Zaretskii
2026-09-09 11:49     ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox