blob: e83edce6b6e6536454c27686543130255f73ead2 [file] [log] [blame]
Anas Nashifa35378e2017-04-22 11:59:30 -04001# All these sections are optional, edit this file as you like.
Marc Herbert8e7c7c62023-09-20 19:45:22 +00002# Zephyr-specific defaults are located in scripts/gitlint/zephyr_commit_rules.py
Anas Nashifa35378e2017-04-22 11:59:30 -04003[general]
Anas Nashif9c6a1aa2018-02-07 13:00:59 -06004ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B3, B1
Anas Nashifa35378e2017-04-22 11:59:30 -04005# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
Kumar Galae9ec91b2017-07-13 12:38:29 -05006verbosity = 3
Anas Nashifa35378e2017-04-22 11:59:30 -04007# By default gitlint will ignore merge commits. Set to 'false' to disable.
Carles Cufi1b8f5e32022-01-10 11:51:52 +01008ignore-merge-commits=false
9ignore-revert-commits=false
10ignore-fixup-commits=false
11ignore-squash-commits=false
Anas Nashifa35378e2017-04-22 11:59:30 -040012# Enable debug mode (prints more output). Disabled by default
13debug = false
14
15# Set the extra-path where gitlint will search for user defined rules
16# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
17extra-path=scripts/gitlint
18
Anas Nashif87766a22017-08-08 08:36:01 -040019[title-max-length-no-revert]
Marc Herbert8e7c7c62023-09-20 19:45:22 +000020# line-length=75
Anas Nashifa35378e2017-04-22 11:59:30 -040021
Anas Nashif2dd5cef2018-01-10 19:12:00 -050022[body-min-line-count]
Marc Herbert8e7c7c62023-09-20 19:45:22 +000023# min-line-count=1
Anas Nashif2dd5cef2018-01-10 19:12:00 -050024
Anas Nashifa35378e2017-04-22 11:59:30 -040025[body-max-line-count]
Marc Herbert8e7c7c62023-09-20 19:45:22 +000026# max-line-count=200
Anas Nashifa35378e2017-04-22 11:59:30 -040027
Anas Nashif3c27c462017-05-05 19:37:52 -040028[title-starts-with-subsystem]
Anas Nashif66af7a62024-04-04 09:03:31 -040029regex = ^(?!subsys:)(?!treewide:)(([^:]+):)(\s([^:]+):)*\s(.+)$
Anas Nashif3c27c462017-05-05 19:37:52 -040030
Anas Nashifa35378e2017-04-22 11:59:30 -040031[title-must-not-contain-word]
32# Comma-separated list of words that should not occur in the title. Matching is case
33# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
34# will not cause a violation, but "WIP: my title" will.
David B. Kinder2541f872017-09-15 11:08:54 -070035words=wip
Anas Nashifa35378e2017-04-22 11:59:30 -040036
37[title-match-regex]
38# python like regex (https://docs.python.org/2/library/re.html) that the
39# commit-msg title must be matched to.
40# Note that the regex can contradict with other rules if not used correctly
41# (e.g. title-must-not-contain-word).
42#regex=^US[0-9]*
43
Anas Nashifb5200752017-06-06 08:50:11 -040044[max-line-length-with-exceptions]
Anas Nashifa35378e2017-04-22 11:59:30 -040045# B1 = body-max-line-length
Marc Herbert8e7c7c62023-09-20 19:45:22 +000046# line-length=75
Anas Nashifa35378e2017-04-22 11:59:30 -040047
48[body-min-length]
49min-length=3
50
51[body-is-missing]
52# Whether to ignore this rule on merge commits (which typically only have a title)
53# default = True
54ignore-merge-commits=false
55
56[body-changed-file-mention]
57# List of files that need to be explicitly mentioned in the body when they are changed
58# This is useful for when developers often erroneously edit certain files or git submodules.
59# By specifying this rule, developers can only change the file when they explicitly reference
60# it in the commit message.
61#files=gitlint/rules.py,README.md