File tree Expand file tree Collapse file tree 4 files changed +59
-1
lines changed
Expand file tree Collapse file tree 4 files changed +59
-1
lines changed Original file line number Diff line number Diff line change 11name : Build
22
3- on : push
3+ on :
4+ push :
5+ branches :
6+ - ' **'
47
58jobs :
69 build :
Original file line number Diff line number Diff line change 1+ name : ShellCheck
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+
8+ jobs :
9+ check :
10+ name : ShellCheck
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+ - name : Install ShellCheck
16+ run : sudo apt-get install -y shellcheck
17+ - name : Run shellcheck
18+ run : ./shellcheck.sh
Original file line number Diff line number Diff line change 1+
2+ # enable additional checks
3+ enable =add-default-case
4+ enable =avoid-nullary-conditions
5+ enable =check-set-e-suppressed
6+ enable =check-unassigned-uppercase
7+ enable =deprecate-which
8+
9+ # cd fail
10+ # this is usually covered by set -e
11+ disable =SC2164
12+
13+ # dont follow source files info
14+ # we check all shell scripts anyways
15+ disable =SC1091
16+
17+ # unnecessary arithmetic variables style
18+ # i dont care whether it says $(($TODAY)) or $((TODAY))
19+ disable =SC2004
20+
21+ # redundant sed invocation
22+ disable =SC2001
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ export IFS=$' \n '
3+ [ -z " $( command -v shellcheck) " ] && echo " shellcheck not installed!" && exit 1
4+ shellcheck --version
5+
6+ SHELLCHECK_ARGS=()
7+ SHELLCHECK_ARGS+=(--wiki-link-count=256)
8+
9+ declare -a FILES
10+ mapfile -t FILES < <( find . -type f -name ' *.sh' )
11+
12+ shellcheck \
13+ " ${SHELLCHECK_ARGS[@]} " \
14+ " $@ " \
15+ " ${FILES[@]} "
You can’t perform that action at this time.
0 commit comments