File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 20
20
env:
21
21
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22
22
SHELLCHECK_OPTS: -e SC1004 # It is posible to exclude some shellcheck warnings.
23
+ SHFMT_OPTS: -s # It is posible to pass arguments to shftm
23
24
with:
24
25
sh_checker_comment: true
25
26
sh_checker_exclude: ".terraform ^dir/example.sh"
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ SHELLCHECK_DISABLE=0
6
6
SHFMT_DISABLE=0
7
7
SH_CHECKER_COMMENT=0
8
8
9
-
10
9
if [ " ${INPUT_SH_CHECKER_SHELLCHECK_DISABLE} " == " 1" ] || [ " ${INPUT_SH_CHECKER_SHELLCHECK_DISABLE} " == " true" ]; then
11
10
SHELLCHECK_DISABLE=1
12
11
fi
92
91
if [ " $SHFMT_DISABLE " != " 1" ]; then
93
92
echo -e " Validating shell scripts files using shfmt\n"
94
93
# shellcheck disable=SC2086
95
- shfmt_error=$( shfmt -d $sh_files )
94
+ shfmt_error=" $( eval shfmt $SHFMT_OPTS -d $sh_files ) "
96
95
shfmt_code=" $? "
97
96
fi
98
97
You can’t perform that action at this time.
0 commit comments