[PATCH v2] [gdb] Add spell check pre-commit hook

Tom Tromey tom@tromey.com
Tue Dec 3 20:18:37 GMT 2024


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

>> I think a setup where the checker just checks by default, and then
>> has a special mode to apply a fix would be good.  This way I could
>> commit my patch and then run the auto-fix, and double-check the
>> output.  In this scenario, if the fix step is slow, it hardly matters
>> IMO.

Tom> The default way the precommit tools work is that if the check fails,
Tom> the commit aborts.

Tom> That's one of the reasons why I did the two-step proposal for
Tom> shellcheck: build a wrapper spellcheck.sh that adds an option to warn
Tom> but pass, and call the wrapper as a local tool.

Tom> One could force the commit manually using --no-verify or SKIP, but
Tom> that seems a bit cumbersome to me.

Yeah.  For me the setup isn't totally ideal, it'd be nice to get
checking but without the scripts potentially rewriting my
patch-in-progress.

It seems fine-ish for black or isort, which presumably have a big
user-base and get a lot of testing.  It's a bit less comfortable for
other tools, maybe, which is why I changed the include-guard script.

Tom


More information about the Gdb-patches mailing list