Re: [PATCH] [pre-commit] Add shellcheck
Tom de Vries <[email protected]> Thu, 30 Jul 2026 15:10:24 +0200
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
On 6/22/26 12:02 PM, Tom de Vries wrote: > We could do something similar (no downloading) for shellcheck: > ... > diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml > index 9910bbb82f2..92c56d95977 100644 > --- a/.pre-commit-config.yaml > +++ b/.pre-commit-config.yaml > @@ -130,3 +130,10 @@ repos: > language: unsupported_script > entry: gdb/contrib/check-file-mode.sh > files: '^(gdb|gdbserver|gdbsupport)/.*$' > + - id: &id5 shellcheck > + name: *id5 > + language: unsupported > + entry: shellcheck > + files: '^(gdb|gdbsupport|gdbserver)/' > + types: ['shell'] > + exclude: '^(gdb/config/djgpp/(djcheck.sh|djconfig.sh)|gdb/ > contrib/ari/(create-web-ari- > in-src.sh|gdb_ari.sh|update-web-ari.sh)|gdb/contrib/(cc-with-tweaks.sh| > gdb-add-index.sh)|gdb/gdb_builda > ll.sh|gdb/gdb_mbuild.sh|gdb/regformats/regdat.sh|gdb/po/gdbtext|gdb/ > testsuite/lib/pdtrace.in)$|/configu > re$' > ... > > This means there's no easy installation, people have to install it > themselves. > > There's also no version pinning. We could add a script that does a > version check though, and check for version 0.11.0. > I ended up using roughly this approach in a v3 ( https://sourceware.org/pipermail/gdb-patches/2026-July/229090.html ) but allowing both 0.10.0 and 0.11.0. Thanks, - Tom