summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorChristian Riedel <cannotguessit+github@protonmail.com>2020-11-01 10:29:53 +0100
committerGitHub <noreply@github.com>2020-11-01 10:29:53 +0100
commit9de1f89b8697809713bce0eadf25fdd578b1d844 (patch)
tree86c0f617f9226e87df21e0818213b93bbad8e336 /docs
parent4eb8e07a82bce11577923520d1ae14399f9644f1 (diff)
Fix pre-commit hook config (#164)
Moved gitlint args from pre-commit's entry to args. Updated docs to reflect best way to add additional arguments. Closes #163
Diffstat (limited to 'docs')
-rw-r--r--docs/index.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/index.md b/docs/index.md
index 251771a..21931fb 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -219,11 +219,14 @@ your `.pre-commit-config.yaml` file like so:
rev: # Fill in a tag / sha here
hooks:
- id: gitlint
- stages: [commit-msg]
- entry: gitlint
args: [--contrib=CT1, --msg-filename]
```
+!!! important
+
+ You need to add `--msg-filename` at the end of your custom `args` list as the gitlint-hook will fail otherwise.
+
+
## Using gitlint in a CI environment
By default, when just running `gitlint` without additional parameters, gitlint lints the last commit in the current
working directory.
@@ -426,4 +429,4 @@ Exit Code | Description
-----------|------------------------------------------------------------
253 | Wrong invocation of the `gitlint` command.
254 | Something went wrong when invoking git.
-255 | Invalid gitlint configuration \ No newline at end of file
+255 | Invalid gitlint configuration