codrut.pro
  • CV
  • Snippets
  • Tags

How to Use: shellcheck

June 25, 2020 One-minute read
bash • tutorial • linting • productivity • scripting

Install Link to heading

From package:

# Manjaro / Arch
sudo pacman -S shellcheck

# Alpine
apk add --update shellcheck

From Docker:

docker run --rm -it -v "$PWD":/work -w /work koalaman/shellcheck-alpine:latest sh

Configure Link to heading

Add a .shellcheckrc file containing your rules:

disable=SC2059

Use Link to heading

shellcheck ./path/to/script.sh