mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-19 08:18:45 -06:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user