From 0e1999c965218ac8f1e348b8f519f4336fe44435 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 3 Mar 2023 12:45:50 +0300 Subject: [PATCH] [#23] 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 00000000..9ce883f4 --- /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 46c9c896..3050af45 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]