Skip to content
Carl Bordum Hansen edited this page Jan 28, 2020 · 13 revisions

Simple test job for GitLab (analyse testScript.sh):

test:
    image: koalaman/shellcheck-alpine:latest
    stage: test
    script: 
    - shellcheck testScript.sh

Here is a CI job that will lint all shell scripts in a git repository:

test:
    image: koalaman/shellcheck-alpine:latest
    stage: test
    before_script:
    - apk update
    - apk add git
    script:
    - git ls-files --exclude='*.sh' --ignored | xargs shellcheck

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally