[binutils-gdb] [pre-commit] Simplify codespell configuration
Tom de Vries via Gdb-cvs <[email protected]> Mon, 15 Jun 2026 11:24:52 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <20260615112452.5A29A4B920C6__14136.7567166284$1781522702$gmane$org@sourceware.org> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c73540bb80ffb5c88da71e3162b7a01e5b9db61 commit 0c73540bb80ffb5c88da71e3162b7a01e5b9db61 Author: Tom de Vries <[email protected]> Date: Mon Jun 15 13:24:08 2026 +0200 [pre-commit] Simplify codespell configuration Simplify the codespell configuration in .pre-commit-config.yaml by moving the file selection to gdb/pyproject.toml. Diff: --- .pre-commit-config.yaml | 2 +- gdb/pyproject.toml | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 80d15f8ee10..3c2a27acb11 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -71,7 +71,7 @@ repos: rev: v2.4.2 hooks: - id: codespell - files: '^(gdbsupport|gdbserver|gdb/(doc|stubs|features|nat|contrib|dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/|^gdb/[^/]*$' + files: '^(gdb|gdbserver|gdbsupport)/' args: [--toml, gdb/pyproject.toml] - id: codespell name: codespell-log diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml index 4109dfb8f82..32d5d6d159c 100644 --- a/gdb/pyproject.toml +++ b/gdb/pyproject.toml @@ -57,8 +57,45 @@ spaces-in-braces = false [tool.codespell] +skip = [ # Skip ChangeLogs and generated files. -skip = '*/ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c,gdb/aclocal.m4,gdbserver/aclocal.m4,gdbsupport/aclocal.m4' +'*/ChangeLog*', +'*/configure', +'gdbsupport/Makefile.in', +'*.dat', +'*.eps', +'gdb/features/*.c', +'gdb/ada-casefold.h', +'gdb/copying.c', +'gdb/gdbarch-gen.h', +'gdb/gdbarch-gen.c', +'gdb/target-delegates-gen.c', +'gdb/aclocal.m4', +'gdbserver/aclocal.m4', +'gdbsupport/aclocal.m4', +# TODO: +'gdb/testsuite/Makefile.in', +'gdb/testsuite/TODO', +'gdb/testsuite/configure.ac', +'gdb/testsuite/boards/*', +'gdb/testsuite/config/*', +'gdb/testsuite/gdb.ada/*', +'gdb/testsuite/gdb.arch/*', +'gdb/testsuite/gdb.asm/*', +'gdb/testsuite/gdb.base/*', +'gdb/testsuite/gdb.btrace/*', +'gdb/testsuite/gdb.compile/*', +'gdb/testsuite/gdb.cp/*', +'gdb/testsuite/gdb.disasm/*', +'gdb/testsuite/gdb.dlang/*', +'gdb/testsuite/gdb.dwarf2/*', +'gdb/testsuite/gdb.fortran/*', +'gdb/testsuite/gdb.linespec/*', +'gdb/testsuite/gdb.python/*', +'gdb/testsuite/gdb.threads/*', +'gdb/testsuite/gdb.trace/*', +'gdb/testsuite/lib/*' +] ignore-words = 'gdb/contrib/codespell-ignore-words.txt' dictionary = 'gdb/contrib/codespell-dictionary.txt,-'