1
0
Fork 0
mirror of https://github.com/ludeeus/action-shellcheck.git synced 2024-08-16 10:09:53 +02:00
Find a file
pvogt09 73cbb64041
Fixes issues with globbing files with partial match(#23)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2020-07-28 13:54:55 +02:00
.github Adds problem-matcher (#20) 2020-07-05 23:50:07 +02:00
testfiles Fixes issues with globbing files with partial match(#23) 2020-07-28 13:54:55 +02:00
.gitattributes Add exclude and testfiles 2020-05-30 11:44:01 +02:00
action.yaml Add the ability to check all scripts in one shellcheck command (#17) 2020-06-26 21:41:45 +02:00
Dockerfile Update alpine to 3.12.0 2020-06-27 19:42:52 +02:00
LICENSE Create LICENSE 2019-03-09 11:25:33 +01:00
README.md Update action checkout to the new default branch (#24) 2020-07-28 10:59:37 +02:00
runaction Fixes issues with globbing files with partial match(#23) 2020-07-28 13:54:55 +02:00

ShellCheck

GitHub action for ShellCheck.

Example

on:
  push:
    branch:
      - master

name: 'Trigger: Push action'

jobs:
  shellcheck:
    name: Shellcheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Run ShellCheck
      uses: ludeeus/action-shellcheck@master

Globally disable checks

To disable specific checks add it to a SHELLCHECK_OPTS env key in the job definition.

example:

    ...
    - name: Run ShellCheck
      uses: ludeeus/action-shellcheck@master
      env:
        SHELLCHECK_OPTS: -e SC2059 -e SC2034 -e SC1090

Ignore paths

You can use the ignore input to disable specific directories.

sample structure:
sample/directory/with/files/toignore/test.sh
sample/directory/with/files/test.sh

example:

    ...
    - name: Run ShellCheck
      uses: ludeeus/action-shellcheck@master
      with:
        ignore: toignore

This will skip sample/directory/with/files/toignore/test.sh

Minimum severity of errors to consider (error, warning, info, style)

You can use the severity input to not fail until specified severity is met, for example fail only if there are errors in scripts but ignore styling, info and warnings.

example:

    ...
    - name: Run ShellCheck
      uses: ludeeus/action-shellcheck@master
      with:
        severity: error

Run shellcheck with all paths in a single invocation

If you run into SC1090/SC1091 errors you may need to tell shellcheck to check all files at once:

    ...
    - name: Run ShellCheck
    uses: ludeeus/action-shellcheck@master
    with:
      check_together: 'yes'

This can turn into a problem if you have enough script files to overwhelm the maximum argv length on your system.