From 4831dd89737954c091105cd67d2ac113c8ac1780 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 28 Jan 2020 10:55:55 -0500 Subject: [PATCH] Add GitLint which replaces GitCommitBear This replaces GitCommitBear with GitLint which does similar linting for git commit messages but using pre-commit hooks. Signed-off-by: Thanh Ha Change-Id: I1622148cc36f072c7c412e88c1945b518b816793 --- .coafile | 8 -------- .pre-commit-config.yaml | 5 +++++ tox.ini | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.coafile b/.coafile index 84e59c2a..e36c7a75 100755 --- a/.coafile +++ b/.coafile @@ -8,14 +8,6 @@ ignore = .tox/**, **.sw?, **.orig -[all.GitCommit] -bears = GitCommitBear -ignore_length_regex = Signed-off-by, - Also-by, - Co-authored-by, - http://, - https:// - [all.Groovy] bears = SpaceConsistencyBear files = **.groovy diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 047fc329..6a43c262 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,11 @@ repos: hooks: - id: prettier + - repo: https://github.com/jorisroovers/gitlint + rev: v0.12.0 + hooks: + - id: gitlint + - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 1.11.2 hooks: diff --git a/tox.ini b/tox.ini index a272a83d..06b418a5 100644 --- a/tox.ini +++ b/tox.ini @@ -70,6 +70,7 @@ deps = pre-commit commands = pre-commit run --all-files + pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG ######### # Tools # -- 2.16.6