From: Thanh Ha Date: Tue, 28 Jan 2020 15:55:55 +0000 (-0500) Subject: Add GitLint which replaces GitCommitBear X-Git-Tag: v0.51.0~10^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=4831dd89737954c091105cd67d2ac113c8ac1780;p=releng%2Fglobal-jjb.git 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 --- 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 #