From 719863e43d1ecf1747dcd254cef7a234fd20cc4e Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Mon, 2 Nov 2026 07:29:05 +0100 Subject: [PATCH] [CI] Lint only .sh files in the shell formatting pass (#7715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- format.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/format.sh b/format.sh index b4c78543b..fba76e93a 100755 --- a/format.sh +++ b/format.sh @@ -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