- uses: actions/checkout@v2
- name: Run the sh-checker
- uses: luizm/action-sh-checker@v0.1.12
+ uses: luizm/action-sh-checker@v0.1.13
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELLCHECK_OPTS: -e SC1004 # exclude some shellcheck warnings.
To reformat shell files use `shfmt`:
```console
-$ shfmt_version=3.0.1
+$ shfmt_version=3.2.4
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w -s .
```
+or
+
+```console
+$ GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
+$ $GOPATH/bin/shfmt -w -s .
+```
+
or if `shfmt` is already in your `PATH`, use `make indent`.
Some IDEs already have support for shfmt.