aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-12-18 12:18:23 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-12-18 12:18:23 -0800
commit35cfe2d01b25f42f7720cbdf20a8d2205f7e80e0 (patch)
tree7fc2532c1c9dcc3c4c355495a4b98ee8db1b4a7c /CONTRIBUTING.md
parent906251e6237ccff60b4b4787cb40a7f8c7960cf7 (diff)
downloadpandoc-35cfe2d01b25f42f7720cbdf20a8d2205f7e80e0.tar.gz
New advice for pre-commit filter.
Without `--diff-filter=MA` it will try to lint deletions, and fail because the file is not present.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 00aa1b1cd..0749daeac 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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