Setup gitlint 18/64218/2
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:50:47 +0000 (09:50 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:15:06 +0000 (10:15 -0400)
Run gitlint to lint commit messages in the lftools repo.

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

.pre-commit-config.yaml
tox.ini

index 20b8768..b02fc89 100644 (file)
@@ -4,7 +4,13 @@ repos:
     rev: v1.2.3
     hooks:
       - id: trailing-whitespace
+
   - repo: https://github.com/ambv/black
     rev: 19.10b0
     hooks:
     - id: black
+
+  - repo: https://github.com/jorisroovers/gitlint
+    rev: v0.13.1
+    hooks:
+      - id: gitlint
diff --git a/tox.ini b/tox.ini
index 2a532c9..2525c1e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -65,6 +65,7 @@ basepython = python3
 deps = pre-commit
 commands =
     pre-commit run --all-files --show-diff-on-failure
+    pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
 
 [testenv:reno]
 description = OpenStack Reno checks