Simplify shellcheck: check rbme directly instead of using find loop #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Shellcheck Lint | |
| on: | |
| push: | |
| paths: | |
| # Run workflow on every push | |
| # only if a file within the specified paths has been changed: | |
| - 'rbme' | |
| - '.github/workflows/shellcheck.yml' | |
| pull_request: | |
| paths: | |
| # Run workflow on every push | |
| # only if a file within the specified paths has been changed: | |
| - 'rbme' | |
| - '.github/workflows/shellcheck.yml' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Restrict permissions for pull requests to read-only for security | |
| permissions: | |
| contents: read | |
| jobs: | |
| shellcheck: | |
| name: Shellcheck Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Required to access files of this repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Verify that Shellcheck is available | |
| - name: Check Shellcheck Version | |
| run: | | |
| shellcheck --version | |
| # Run Shellcheck on repository with detailed output | |
| # --- | |
| # https://github.com/koalaman/shellcheck | |
| # --- | |
| # Excluded checks: | |
| # https://www.shellcheck.net/wiki/SC1091 -- Not following: /etc/rc.status was... | |
| # https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source. .. | |
| # --- | |
| - name: Run Shellcheck | |
| run: | | |
| shellcheck --color=always --severity=warning --exclude=SC1091,SC1090 ./rbme | |