Skip to content

Commit

Permalink
chore: Explicitly switch gitlint to regex "search" semantics
Browse files Browse the repository at this point in the history
gitlint previously used regex "match" semantics, where it would
evaluate regexes for ignore-by-title and ignore-body-lines from the
beginning of a line. It is switching to "search" semantics, meaning
the regex is applied against the whole line.

We are already using ignore-by-title and ignore-body-lines with
anchored regexes (i.e. ones starting with "^"), so the only thing that
we still need to set is regex-style-search in the "general" section,
in order to silence the warning.

Reference:
https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
  • Loading branch information
fghaas committed Oct 24, 2023
1 parent 373e616 commit 42a2ac2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[general]
contrib=contrib-title-conventional-commits
regex-style-search=true

# When invoked as just "gitlint" without any other arguments, Gitlint
# processes the most recent commit message *unless* it's being fed
Expand Down

0 comments on commit 42a2ac2

Please sign in to comment.