[binutils-gdb] [gdb/unittests] Ignore spellcheck warning in rsp-low-selftests.c
Tom de Vries
vries@sourceware.org
Thu Apr 10 16:41:59 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99d0bac09bac091b2b9ea8ae634361008b08033b
commit 99d0bac09bac091b2b9ea8ae634361008b08033b
Author: Tom de Vries <tdevries@suse.de>
Date: Thu Apr 10 18:42:06 2025 +0200
[gdb/unittests] Ignore spellcheck warning in rsp-low-selftests.c
Ignore the following spellcheck warning:
...
$ codespell --config gdb/contrib/setup.cfg gdb/unittests
gdb/unittests/rsp-low-selftests.c:54: fo ==> of, for, to, do, go
...
and add gdb/unittests to the pre-commit codespell configuration.
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
.pre-commit-config.yaml | 2 +-
gdb/unittests/rsp-low-selftests.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4a9f7ac6367..ca4650ffc28 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -69,7 +69,7 @@ repos:
rev: v2.4.1
hooks:
- id: codespell
- files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config))/'
+ files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests))/'
args: [--config, gdb/contrib/setup.cfg]
- repo: local
hooks:
diff --git a/gdb/unittests/rsp-low-selftests.c b/gdb/unittests/rsp-low-selftests.c
index df849c904b2..7a1b2decc3c 100644
--- a/gdb/unittests/rsp-low-selftests.c
+++ b/gdb/unittests/rsp-low-selftests.c
@@ -51,7 +51,7 @@ static void test_hex2str ()
{
SELF_CHECK (hex2str ("666f6f") == "foo");
SELF_CHECK (hex2str ("666f6fa") == "foo");
- SELF_CHECK (hex2str ("666f6f", 2) == "fo");
+ SELF_CHECK (hex2str ("666f6f", 2) == "fo"); /* codespell:ignore */
SELF_CHECK (hex2str ("666", 2) == "f");
SELF_CHECK (hex2str ("666", 6) == "f");
SELF_CHECK (hex2str ("") == "");
More information about the Binutils-cvs
mailing list