From 968570d830ed840cce8699f30271d48e336f450b Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 25 Jul 2023 10:03:56 -0400 Subject: [PATCH] gitlint: ignore body lines that are footnotes Ignore lines that start like `[1]: ` or `[2] ` such that we can have long text like URLs in the commits without triggering other gitlint body rules. Copied from the same changes already made in samba-container (PR samba-in-kubernetes/samba-container#150). Signed-off-by: John Mulligan --- .gitlint | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlint b/.gitlint index 4eb06746..ff83c5c6 100644 --- a/.gitlint +++ b/.gitlint @@ -30,6 +30,9 @@ ignore-merge-commits=true # Enable debug mode (prints more output). Disabled by default. # debug=true +# Enable search regex and remove warning message. +regex-style-search=true + # Enable community contributed rules # See http://jorisroovers.github.io/gitlint/contrib_rules for details contrib=contrib-body-requires-signed-off-by @@ -106,11 +109,16 @@ regex=^.{2,32}: .* # Use 'all' to ignore all rules # ignore=T1,body-min-length -# [ignore-body-lines] +[ignore-body-lines] # Ignore certain lines in a commit body that match a regex. # E.g. Ignore all lines that start with 'Co-Authored-By' # regex=^Co-Authored-By +# ignore lines that are "footnotes", that start like `[1]: ` or `[2]: ` and so on +# this will make it easy to put long urls in commit messages without +# triggering gitlint body rules +regex=^\[[0-9]+\]:? + + # This is a contrib rule - a community contributed rule. These are disabled by default. # You need to explicitly enable them one-by-one by adding them to the "contrib" option # under [general] section above.