name: formatter-shfmt
on:
  [push, pull_request]
jobs:
  sh-checker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run the sh-checker
        uses: luizm/action-sh-checker@v0.3.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SHFMT_OPTS: -i=2 -ln=bash -fn -ci -sr # arguments to shfmt.
        with:
          sh_checker_comment: true
          sh_checker_exclude: "documentation images sounds etc"
          sh_checker_shfmt_disable: false
          sh_checker_shellcheck_disable: true
          sh_checker_checkbashisms_enable: false
