Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/5] [pre-commit] Don't require text type for codespell hook
Date: Mon, 20 Jul 2026 14:50:56 +0200	[thread overview]
Message-ID: <20260720125056.1373177-6-tdevries@suse.de> (raw)
In-Reply-To: <20260720125056.1373177-1-tdevries@suse.de>

Codespell's .pre-commit-hooks.yaml sets "types: [text]".

Override this using "types: [file]", to make the codespell hook see the same
files as codespell usage outside pre-commit:
...
$ codespell --toml gdb/pyproject.toml gdb*
...

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
---
 .pre-commit-config.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 260cae67e56..aeb3058f725 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -92,6 +92,11 @@ repos:
     - id: codespell
       args: &codespell_args [--toml, gdb/pyproject.toml]
       files: &gdb_files '^(gdb|gdbserver|gdbsupport)/'
+      # Override the [text] setting in .pre-commit-hooks.yaml, allowing this
+      # hook to see the same files as codespell usage outside pre-commit.
+      # Instead, filter files in gdb/pyproject.toml.
+      types: *types_default
+      types_or: *types_or_default
     - id: codespell
       name: codespell-log
       entry: gdb/contrib/codespell-log.sh
-- 
2.51.0


      parent reply	other threads:[~2026-07-20 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
2026-07-20 12:50 ` [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in Tom de Vries
2026-07-20 12:50 ` [PATCH 2/5] [gdb] Remove superfluous global " Tom de Vries
2026-07-20 12:50 ` [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in Tom de Vries
2026-07-20 12:50 ` [PATCH 4/5] [pre-commit] Don't require text type for check-whitespace hook Tom de Vries
2026-07-20 12:50 ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260720125056.1373177-6-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox