diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c55dff5569..1ff688cc3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: for file in $(find . -type f -not -path "*.git*"); do if file "$file" | grep -qi shell; then echo "### Checking file $file..." - podman run --rm -v "$PWD:/mnt" docker.io/peterdavehello/shfmt:latest shfmt -d -s -ci -sr -kp /mnt/$file + podman run --rm -v "$PWD:/mnt" docker.io/peterdavehello/shfmt:latest shfmt -d -s -ci -sr -kp -fn -i=0 -p /mnt/$file result=$(( result + $? )) fi done diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0b52143de..a3bbacc93a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ done - `shellcheck -s sh -a -o all -Sstyle -Calways -x -e SC2310,SC2311,SC2312` - use `shfmt` to style the code using: - install from [HERE](https://github.com/mvdan/sh) using `go install mvdan.cc/sh/v3/cmd/shfmt@latest` - - `shfmt -d -s -ci -sr -kp` + - `shfmt shfmt -d -s -ci -sr -kp` - use `bashate` to check the code: - install using `pip3 install bashate` - `bashate -i E002,E003,E010,E011 --max-line-length 120`