]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/unittests] Ignore spellcheck warning in rsp-low-selftests.c
authorTom de Vries <tdevries@suse.de>
Thu, 10 Apr 2025 16:42:06 +0000 (18:42 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 10 Apr 2025 16:42:06 +0000 (18:42 +0200)
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>
.pre-commit-config.yaml
gdb/unittests/rsp-low-selftests.c

index 4a9f7ac63674a6fa19eb1666f2b8935c4bbcc32e..ca4650ffc28c2cd96291caba51da957862aea773 100644 (file)
@@ -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:
index df849c904b29a6dbe4c305b39e78ecec1278814a..7a1b2decc3c0a31a1c4d9610b45abf105c92a1d6 100644 (file)
@@ -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 ("") == "");