From b5da99c6b0978880c948fbdf2b3b3cf449bfdb59 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 29 Aug 2021 12:28:58 -0700 Subject: [PATCH] Add pre-commit instructions --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index a155b83..8de2194 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,20 @@ pandoc -s -f markdown-smart -t man shellcheck.1.md -o shellcheck.1 sudo mv shellcheck.1 /usr/share/man/man1 ``` +### pre-commit + +To run ShellCheck via [pre-commit](https://pre-commit.com/), add the Docker image to your `.pre-commit-config.yaml`: + +``` +- repo: local + hooks: + - id: shellcheck + name: shellcheck + language: docker_image + entry: koalaman/shellcheck:stable # or e.g. ":v0.7.2" + types: [shell] +``` + ### Travis CI Travis CI has now integrated ShellCheck by default, so you don't need to manually install it.