From 8226d49376e771a992162340e468b57ef92031a1 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 2 Mar 2023 14:08:31 +0300 Subject: [PATCH] [#83] pre-commit: Add gitlint hook Signed-off-by: Evgenii Stratonikov --- .gitlint | 10 ++++++++++ .pre-commit-config.yaml | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 .gitlint diff --git a/.gitlint b/.gitlint new file mode 100644 index 000000000..9ce883f49 --- /dev/null +++ b/.gitlint @@ -0,0 +1,10 @@ +[general] +fail-without-commits=true +contrib=CC1 + +[title-match-regex] +regex=^\[\#[0-9]+\]\s + +[ignore-by-title] +regex=^Release(.*) +ignore=title-match-regex diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7edc6cb7..ce4709283 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,9 @@ repos: rev: v1.51.2 hooks: - id: golangci-lint + + - repo: https://github.com/jorisroovers/gitlint + rev: v0.18.0 + hooks: + - id: gitlint + stages: [commit-msg]