From 73e3597b22e9fe7ee0ab51436693adb1c58b65c1 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 6 Jun 2020 09:50:47 -0400 Subject: [PATCH] Setup gitlint Run gitlint to lint commit messages in the lftools repo. Signed-off-by: Thanh Ha Change-Id: I3daf64a3a234e191d035c583d6e752fa060accae --- .pre-commit-config.yaml | 6 ++++++ tox.ini | 1 + 2 files changed, 7 insertions(+) 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 -- 2.16.6