[CI] Lint only .sh files in the shell formatting pass (#7715)

The changed-file matcher reused the `*.sh` glob as a regular expression,
where the leading `*` applies to the `(^|/)` group instead of the file
name. Every path ending in "sh" matched, so NSIS include files (.nsh) were
handed to shellcheck and failed the format leg.

Match the suffix explicitly and keep the glob for the find(1) branch.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-11-02 07:29:05 +01:00 • committed by GitHub
parent d021f20d14
commit 719863e43d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,7 @@ cmakefile="CMakeLists.txt"
cmakedir="cmake/.*\\.cmake"
cmakeinclude=("cmake/gtest-CMakeLists.txt.in")
scripts="*.sh"
scriptsrx="[^/]*\\.sh$"
color="--"
verbosity=0
sep="----------"
@ -254,7 +255,7 @@ if [[ $branch ]]; then
if [[ $do_shell ]]; then
shell_names=()
for name in "${basenames[@]}"; do
filerx="(^|/)$scripts$"
filerx="(^|/)$scriptsrx"
if [[ $name =~ $filerx ]]; then
shell_names+=("$name")
fi