mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08: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:
parent
d021f20d14
commit
719863e43d
1 changed files with 2 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ cmakefile="CMakeLists.txt"
|
||||||
cmakedir="cmake/.*\\.cmake"
|
cmakedir="cmake/.*\\.cmake"
|
||||||
cmakeinclude=("cmake/gtest-CMakeLists.txt.in")
|
cmakeinclude=("cmake/gtest-CMakeLists.txt.in")
|
||||||
scripts="*.sh"
|
scripts="*.sh"
|
||||||
|
scriptsrx="[^/]*\\.sh$"
|
||||||
color="--"
|
color="--"
|
||||||
verbosity=0
|
verbosity=0
|
||||||
sep="----------"
|
sep="----------"
|
||||||
|
|
@ -254,7 +255,7 @@ if [[ $branch ]]; then
|
||||||
if [[ $do_shell ]]; then
|
if [[ $do_shell ]]; then
|
||||||
shell_names=()
|
shell_names=()
|
||||||
for name in "${basenames[@]}"; do
|
for name in "${basenames[@]}"; do
|
||||||
filerx="(^|/)$scripts$"
|
filerx="(^|/)$scriptsrx"
|
||||||
if [[ $name =~ $filerx ]]; then
|
if [[ $name =~ $filerx ]]; then
|
||||||
shell_names+=("$name")
|
shell_names+=("$name")
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue