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