[0/5,pre-commit] Add codespell hook

Message ID 20250321144251.23618-1-tdevries@suse.de
Headers
Series Add codespell hook |

Message

Tom de Vries March 21, 2025, 2:42 p.m. UTC
  This patch series contains:
- 4 patches that make gdbsupport and gdbserver codespell-clean (with
  codespell v2.4.1), and
- a patch that adds a pre-commit codespell hook for those directories.

I've submitted a related RFC [1] a while back that tried hard to be
non-intrusive on codespell-unclean directories, but consequently was a bit
convoluted.

This patch series instead uses a straightforward approach on codespell-clean
directories.

[1] https://inbox.sourceware.org/gdb-patches/20241129161707.25292-1-tdevries@suse.de/#r

Tom de Vries (5):
  [gdbsupport] Fix a typo in common-debug.h
  [gdbsupport] Ignore pathc in codespell check in gdb_tilde_expand.cc
  [gdbserver] Fix typo in tracepoint.cc
  [gdb/contrib] Add SME to codespell-ignore-words.txt
  [precommit] Add codespell hook

 .pre-commit-config.yaml                | 6 ++++++
 gdb/contrib/codespell-ignore-words.txt | 1 +
 {gdbserver => gdb/contrib}/setup.cfg   | 4 +++-
 gdbserver/tracepoint.cc                | 2 +-
 gdbsupport/agent.cc                    | 1 +
 gdbsupport/common-debug.h              | 2 +-
 gdbsupport/gdb_tilde_expand.cc         | 4 ++--
 gdbsupport/setup.cfg                   | 4 ----
 8 files changed, 15 insertions(+), 9 deletions(-)
 rename {gdbserver => gdb/contrib}/setup.cfg (64%)
 delete mode 100644 gdbsupport/setup.cfg


base-commit: daf53ffeaa968694f783d4ad6ee0531b9f2bd9a6
  

Comments

Tom Tromey March 21, 2025, 4:17 p.m. UTC | #1
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> This patch series contains:
Tom> - 4 patches that make gdbsupport and gdbserver codespell-clean (with
Tom>   codespell v2.4.1), and
Tom> - a patch that adds a pre-commit codespell hook for those directories.

I read through this.  I'm in favor of the idea and I think the patches
look good.  I would suggest waiting a little while for others to comment
before checking this in though, in case anyone has concerns -- adding a
new hook here does impose a cost on everybody using the feature.

Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Tom de Vries March 27, 2025, 2:09 p.m. UTC | #2
On 3/21/25 17:17, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> This patch series contains:
> Tom> - 4 patches that make gdbsupport and gdbserver codespell-clean (with
> Tom>   codespell v2.4.1), and
> Tom> - a patch that adds a pre-commit codespell hook for those directories.
> 
> I read through this.  I'm in favor of the idea and I think the patches
> look good.  I would suggest waiting a little while for others to comment
> before checking this in though, in case anyone has concerns -- adding a
> new hook here does impose a cost on everybody using the feature.

Hi Tom,

thanks for the reviews.

I've pushed the first four patches of the series, and will wait till 
Monday to commit the fifth (minus the simulated typo that Thiago 
noticed). [ I'm expecting there might be concerns raised after 
committing regardless of how long I wait,  so I'm not sure waiting much 
longer makes sense ].

Agreed, there will be a cost to keeping gdbserver/gdbsupport codespell 
clean, but hopefully also a benefit.  I guess experience will have to 
tell which one will outweigh the other.

Thanks,
- Tom

> Approved-By: Tom Tromey <tom@tromey.com>
> 
> Tom