Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- id: gitlint
name: gitlint
language: python
entry: gitlint --msg-filename
stages: [commit-msg]
13 changes: 13 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ gitlint uninstall-hook
file in your local repository, gitlint will refuse to install the ```commit-msg``` hook. Gitlint will also only
uninstall unmodified commit-msg hooks that were installed by gitlint.

## Using gitlint through [pre-commit](https://pre-commit.com)

`gitlint` can be configured as a plugin for the `pre-commit` git hooks
framework. Simply add the configuration to your `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/jorisroovers/gitlint
rev: # Fill in a tag / sha here
hooks:
- id: gitlint
```


## Using gitlint in a CI environment ##
By default, when just running ```gitlint``` without additional parameters, gitlint lint the last commit in the current
git repository.
Expand Down