From c543ff457a2c48046977bfe5310433bb99d50e3f Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 31 May 2024 18:16:23 -0700 Subject: [PATCH] gitlint: Add regex to ignore some long lines. This does not resolve issues for all previous commits where the B1 rule of long lines in the body would fail, but will allow some obvious common cases to pass. Inspired by jorisroovers/gitlint#255, this should cover at least lines starting with: - http or https [where URLs can be long] - Co-authored-by: [where emails/names can be long] The downside to this rule is that the line numbering is apparently offset, based on the gitlint documentation. (https://jorisroovers.com/gitlint/latest/ignoring_commits/) --- .gitlint | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlint b/.gitlint index 1e2e15fa21..9fec2d8393 100644 --- a/.gitlint +++ b/.gitlint @@ -55,3 +55,6 @@ ignore=all # Ignore certain rules, you can reference them by their id or by their full name # Use 'all' to ignore all rules # ignore=T1,body-min-length + +[ignore-body-lines] +regex=^(Co-authored-by:| *https?://\S+$)