From 8a1e6dc0240d353696b4d21810d71a8cb8698bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Socho=C5=84?= Date: Tue, 22 May 2018 18:40:25 +0200 Subject: [PATCH] Expand with info how to pass ignore rules when running shellcheck in Docker. --- Ignore.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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: