New advice for pre-commit filter.
Without `--diff-filter=MA` it will try to lint deletions, and fail because the file is not present.
This commit is contained in:
parent
906251e623
commit
35cfe2d01b
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ A good way to ensure no new warnings are introduced is to use a Git
|
|||
before creating a commit:
|
||||
|
||||
#!/bin/sh
|
||||
git diff --cached --name-only | grep '\.hs$' | xargs hlint
|
||||
git diff --diff-filter=MA --cached --name-only | grep '\.hs$' | \
|
||||
xargs hlint --hint .hlint.yaml
|
||||
|
||||
Saving this to `.git/hooks/pre-commit`, and making the script
|
||||
executable, will prevent accidental introduction of potentially
|
||||
|
|
Loading…
Add table
Reference in a new issue