File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ push :
4+ branches : [ main ]
5+ pull_request :
6+ branches : [ main ]
7+
8+ permissions :
9+ contents : read
10+ pull-requests : read
11+
12+ jobs :
13+ lint :
14+ name : Lint
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Install shellcheck
21+ run : |
22+ scversion="v0.10.0"
23+ wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
24+ echo "${PWD}/shellcheck-${scversion}/shellcheck" >> ${GITHUB_PATH}
25+
26+ - name : Shellcheck
27+ run : |
28+ shellcheck ./script/validate/dco ./script/validate/fileheader ./script/validate/vendor
Original file line number Diff line number Diff line change 2626verbosity=" ${DCO_VERBOSITY--v} "
2727range=
2828commit_range=" ${DCO_RANGE-} "
29- [ ! -z " ${commit_range} " ] && {
29+ [ -n " ${commit_range} " ] && {
3030 range=" -range ${commit_range} "
3131}
32- GIT_CHECK_EXCLUDE=" ./vendor:./script/validate/template" git-validation ${verbosity} ${range} -run DCO,short-subject,dangling-whitespace
32+ GIT_CHECK_EXCLUDE=" ./vendor:./script/validate/template" git-validation " ${verbosity} " " ${range} " -run DCO,short-subject,dangling-whitespace
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ DIFF_PATH="vendor/ go.mod go.sum"
3838# need word splitting here to avoid reading the whole DIFF_PATH as one pathspec
3939#
4040# shellcheck disable=SC2046
41- DIFF=$( git status --porcelain -- $ DIFF_PATH)
42- DIFF_CONTENT=$( git diff -- $ DIFF_PATH)
41+ DIFF=$( git status --porcelain -- " ${ DIFF_PATH} " )
42+ DIFF_CONTENT=$( git diff -- " ${ DIFF_PATH} " )
4343
4444if [ " $DIFF " ]; then
4545 echo
You can’t perform that action at this time.
0 commit comments