mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-10-30 06:16:21 +00:00
ci: lint commit messages (#510)
Lint commit messages using gitlint in pre-commit. Gitlint enforces rules that are configured by .gitlint. The checks enforce the [`Conventional Commits`](https://www.conventionalcommits.org) commit message style. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
35
.gitlint
Normal file
35
.gitlint
Normal file
@@ -0,0 +1,35 @@
|
||||
[general]
|
||||
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
|
||||
verbosity = 3
|
||||
|
||||
regex-style-search=true
|
||||
|
||||
# Ignore rules, reference them by id or name (comma-separated)
|
||||
ignore=title-trailing-punctuation, T3
|
||||
|
||||
# Enable specific community contributed rules
|
||||
contrib=contrib-title-conventional-commits,CC1
|
||||
|
||||
# Set the extra-path where gitlint will search for user defined rules
|
||||
extra-path=scripts/gitlint
|
||||
|
||||
[title-max-length]
|
||||
line-length=80
|
||||
|
||||
[title-min-length]
|
||||
min-length=5
|
||||
|
||||
[ignore-by-title]
|
||||
# Match commit titles starting with "Release"
|
||||
regex=^Release(.*)
|
||||
ignore=title-max-length,body-min-length
|
||||
|
||||
[ignore-by-body]
|
||||
# Match commits message bodies that have a line that contains 'release'
|
||||
regex=(.*)release(.*)
|
||||
ignore=all
|
||||
|
||||
[ignore-by-author-name]
|
||||
# Match commits by author name (e.g. ignore dependabot commits)
|
||||
regex=dependabot
|
||||
ignore=all
|
||||
Reference in New Issue
Block a user