You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
582 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. name: shellcheck
  2. on: [push, pull_request]
  3. jobs:
  4. formatCheck:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - name: Install Shellcheck
  9. run: sudo apt-get install -y shellcheck
  10. - name: DoShellcheck
  11. run: shellcheck -V && shellcheck -e SC2181 **/*.sh && echo "shellcheck OK"
  12. - name: Install shfmt
  13. run: curl -sSL https://github.com/mvdan/sh/releases/download/v3.1.2/shfmt_v3.1.2_linux_amd64 -o ~/shfmt && chmod +x ~/shfmt
  14. - name: shfmt
  15. run: ~/shfmt -l -w -i 2 . ; git diff --exit-code && echo "shfmt OK"