diff --git a/Ignore.md b/Ignore.md index e89c56d..8174c07 100644 --- a/Ignore.md +++ b/Ignore.md @@ -23,6 +23,20 @@ Set the `SHELLCHECK_OPTS` variable in your `.bashrc`, `/etc/profile` or equivale export SHELLCHECK_OPTS="-e SC2059 -e SC2034 -e SC1090" +### Ignoring one or more type of error with shellcheck in Docker + +Pass it to Docker directly: + + docker run -e SHELLCHECK_OPTS="-e SC2059 -e SC2034 -e SC1090" -v "$PWD:/mnt" koalaman/shellcheck myscript + +Set the `SHELLCHECK_OPTS` variable in shell: + + export SHELLCHECK_OPTS="-e SC2059 -e SC2034 -e SC1090" + +and then pass it to Docker: + + docker run -e SHELLCHECK_OPTS="$SHELLCHECK_OPTS" -v "$PWD:/mnt" koalaman/shellcheck myscript + ### Ignoring all instances in a file (0.4.4+) Add a [[directive]] at the top of the file: