mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 21:03:51 -07:00
Fix #2909, add a pre-commit hook
This commit is contained in:
parent
d80fdfa9e8
commit
d63ed2398c
2 changed files with 24 additions and 0 deletions
13
.pre-commit-hooks.yaml
Normal file
13
.pre-commit-hooks.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- id: shellcheck
|
||||
name: ShellCheck v0.9.0
|
||||
description: Static analysis tool for shell scripts
|
||||
language: haskell
|
||||
# https://pre-commit.com/#haskell
|
||||
minimum_pre_commit_version: 3.4.0
|
||||
entry: shellcheck
|
||||
types:
|
||||
- shell
|
||||
# https://github.com/koalaman/shellcheck/issues/809
|
||||
exclude_types:
|
||||
- zsh
|
11
README.md
11
README.md
|
@ -262,6 +262,17 @@ repos:
|
|||
# args: ["--severity=warning"] # Optionally only show errors and warnings
|
||||
```
|
||||
|
||||
Or (pre-commit version > 3.4.0)
|
||||
|
||||
```yaml
|
||||
repos:
|
||||
- repo: https://github.com/koalaman/shellcheck
|
||||
rev: v0.7.2
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
# args: ["--severity=warning"] # Optionally only show errors and warnings
|
||||
```
|
||||
|
||||
### Travis CI
|
||||
|
||||
Travis CI has now integrated ShellCheck by default, so you don't need to manually install it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue