]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[pre-commit] Add tclint hook
authorTom de Vries <tdevries@suse.de>
Thu, 18 Sep 2025 06:08:41 +0000 (08:08 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 18 Sep 2025 06:08:41 +0000 (08:08 +0200)
commit7f6c7a5bb37ccfd8771902d9343a57fc5a23daaa
tree05c990f9e32beff9878cf6b39c0d0350fa3fd31c
parentab395c4422d86c5c478c1a2e571ea890e8f47736
[pre-commit] Add tclint hook

Add a pre-commit hook that enables tclint [1] (a Tcl linter) for the gdb
testsuite.

The pre-commit hook doesn't reference the official url, because that one
doesn't have pre-commit support yet [2].

Instead, it uses a fork on my personal github account.  The fork contains a
tag v0.6.0-gdb, which is the official v0.6.0 release plus a commit adding a
.pre-commit-hooks.yaml file.  Given that this is a personal github account, I
thought it would be safer to refer to the git SHA than to the tag.

Also add a tclint configuration file gdb/tclint.toml.

In the configuration file, we still ignore most dirs because they're not
tclint-clean.

Consequently, the tclint pre-commit check passes:
...
$ pre-commit run --all-files -v tclint
tclint........................Passed
- hook id: tclint
- duration: 0.25s
$
...

PR testsuite/33403
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33403

Approved-By: Tom Tromey <tom@tromey.com>
[1] https://github.com/nmoroze/tclint
[2] https://github.com/nmoroze/tclint/issues/110
.pre-commit-config.yaml
gdb/tclint.toml [new file with mode: 0644]