Skip to content

Commit 968570d

Browse files
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 <[email protected]>
1 parent 25a9758 commit 968570d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.gitlint

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ ignore-merge-commits=true
3030
# Enable debug mode (prints more output). Disabled by default.
3131
# debug=true
3232

33+
# Enable search regex and remove warning message.
34+
regex-style-search=true
35+
3336
# Enable community contributed rules
3437
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
3538
contrib=contrib-body-requires-signed-off-by
@@ -106,11 +109,16 @@ regex=^.{2,32}: .*
106109
# Use 'all' to ignore all rules
107110
# ignore=T1,body-min-length
108111

109-
# [ignore-body-lines]
112+
[ignore-body-lines]
110113
# Ignore certain lines in a commit body that match a regex.
111114
# E.g. Ignore all lines that start with 'Co-Authored-By'
112115
# regex=^Co-Authored-By
113116

117+
# ignore lines that are "footnotes", that start like `[1]: ` or `[2]: ` and so on
118+
# this will make it easy to put long urls in commit messages without
119+
# triggering gitlint body rules
120+
regex=^\[[0-9]+\]:? +
121+
114122
# This is a contrib rule - a community contributed rule. These are disabled by default.
115123
# You need to explicitly enable them one-by-one by adding them to the "contrib" option
116124
# under [general] section above.

0 commit comments

Comments
 (0)