Setup gitlint for linting commits 21/64221/1
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:57:03 +0000 (09:57 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:57:03 +0000 (09:57 -0400)
Setup gitlint to lint commit messages in this repo.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ia93eacc169cfb5cf0b071f4ada483e914b36b481

.pre-commit-config.yaml
tox.ini

index 43f166b..5341f8a 100644 (file)
@@ -7,3 +7,8 @@ repos:
       - id: check-merge-conflict
       - id: end-of-file-fixer
       - id: trailing-whitespace
+
+  - repo: https://github.com/jorisroovers/gitlint
+    rev: v0.13.1
+    hooks:
+      - id: gitlint
diff --git a/tox.ini b/tox.ini
index e1646d3..6b3142e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -49,3 +49,4 @@ deps =
 commands =
     pre-commit install
     pre-commit run --all-files --show-diff-on-failure
+    pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG