File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ function plugin_read_list() {
2121
2222IFS=$' \n\t '
2323files=()
24+ options=()
2425
2526# Evaluate all the globs and return the files that exist
2627for file in $( plugin_read_list FILES) ; do
@@ -29,13 +30,18 @@ for file in $(plugin_read_list FILES) ; do
2930 fi
3031done
3132
33+ # Read in the options to pass to shellcheck
34+ for option in $( plugin_read_list OPTIONS) ; do
35+ options+=(" $option " )
36+ done
37+
3238if [[ -z ${files:- } ]] ; then
3339 echo " No files found to shellcheck"
3440 exit 1
3541fi
3642
3743echo " +++ Running shellcheck on ${# files[@]} files"
38- if docker run --rm -v " $PWD :/mnt" --workdir " /mnt" koalaman/shellcheck " ${files[@]} " ; then
44+ if docker run --rm -v " $PWD :/mnt" --workdir " /mnt" koalaman/shellcheck " ${options[@]} " " ${ files[@]}" ; then
3945 echo " Files are ok ✅"
4046else
4147 exit 1
Original file line number Diff line number Diff line change @@ -9,5 +9,8 @@ configuration:
99 files :
1010 type : [string, array]
1111 minItems : 1
12+ options :
13+ type : [string, array]
14+ minItems : 1
1215 required :
1316 - files
You can’t perform that action at this time.
0 commit comments