From: Thanh Ha Date: Sat, 6 Jun 2020 13:50:47 +0000 (-0400) Subject: Setup gitlint X-Git-Tag: v0.34.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F64218%2F2;p=releng%2Flftools.git Setup gitlint Run gitlint to lint commit messages in the lftools repo. Signed-off-by: Thanh Ha Change-Id: I3daf64a3a234e191d035c583d6e752fa060accae --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20b8768f..b02fc899 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 2a532c9c..2525c1eb 100644 --- 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