dcycle / docker-shell-lint

Lint shell scripts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lint shell scripts using shellcheck.

Run check on certain scripts:

docker run --rm -v "$(pwd)":/code dcycle/shell-lint:2 ./my-shell-script.sh
docker run --rm -v "$(pwd)":/code dcycle/shell-lint:2 ./another-shell-script.sh

Run check on all scripts:

find . -name "*.sh" -print0 | \
  xargs -0 docker run -v "$(pwd)":/code dcycle/shell-lint:2

Get help like this:

docker run --rm -v "$(pwd)":/code dcycle/shell-lint:2

Ignore rules like this:

# shellcheck disable=SC2016
echo 'I have $1 in my pocket.'

Resources

About

Lint shell scripts.


Languages

Language:Shell 94.4%Language:Dockerfile 5.6%