Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 1 | # All these sections are optional, edit this file as you like. |
Marc Herbert | 8e7c7c6 | 2023-09-20 19:45:22 +0000 | [diff] [blame] | 2 | # Zephyr-specific defaults are located in scripts/gitlint/zephyr_commit_rules.py |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 3 | [general] |
Anas Nashif | 9c6a1aa | 2018-02-07 13:00:59 -0600 | [diff] [blame] | 4 | ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B3, B1 |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 5 | # verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this |
Kumar Gala | e9ec91b | 2017-07-13 12:38:29 -0500 | [diff] [blame] | 6 | verbosity = 3 |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 7 | # By default gitlint will ignore merge commits. Set to 'false' to disable. |
Carles Cufi | 1b8f5e3 | 2022-01-10 11:51:52 +0100 | [diff] [blame] | 8 | ignore-merge-commits=false |
| 9 | ignore-revert-commits=false |
| 10 | ignore-fixup-commits=false |
| 11 | ignore-squash-commits=false |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 12 | # Enable debug mode (prints more output). Disabled by default |
| 13 | debug = 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 |
| 17 | extra-path=scripts/gitlint |
| 18 | |
Anas Nashif | 87766a2 | 2017-08-08 08:36:01 -0400 | [diff] [blame] | 19 | [title-max-length-no-revert] |
Marc Herbert | 8e7c7c6 | 2023-09-20 19:45:22 +0000 | [diff] [blame] | 20 | # line-length=75 |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 21 | |
Anas Nashif | 2dd5cef | 2018-01-10 19:12:00 -0500 | [diff] [blame] | 22 | [body-min-line-count] |
Marc Herbert | 8e7c7c6 | 2023-09-20 19:45:22 +0000 | [diff] [blame] | 23 | # min-line-count=1 |
Anas Nashif | 2dd5cef | 2018-01-10 19:12:00 -0500 | [diff] [blame] | 24 | |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 25 | [body-max-line-count] |
Marc Herbert | 8e7c7c6 | 2023-09-20 19:45:22 +0000 | [diff] [blame] | 26 | # max-line-count=200 |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 27 | |
Anas Nashif | 3c27c46 | 2017-05-05 19:37:52 -0400 | [diff] [blame] | 28 | [title-starts-with-subsystem] |
Anas Nashif | 66af7a6 | 2024-04-04 09:03:31 -0400 | [diff] [blame] | 29 | regex = ^(?!subsys:)(?!treewide:)(([^:]+):)(\s([^:]+):)*\s(.+)$ |
Anas Nashif | 3c27c46 | 2017-05-05 19:37:52 -0400 | [diff] [blame] | 30 | |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 31 | [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. Kinder | 2541f87 | 2017-09-15 11:08:54 -0700 | [diff] [blame] | 35 | words=wip |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 36 | |
| 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 Nashif | b520075 | 2017-06-06 08:50:11 -0400 | [diff] [blame] | 44 | [max-line-length-with-exceptions] |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 45 | # B1 = body-max-line-length |
Marc Herbert | 8e7c7c6 | 2023-09-20 19:45:22 +0000 | [diff] [blame] | 46 | # line-length=75 |
Anas Nashif | a35378e | 2017-04-22 11:59:30 -0400 | [diff] [blame] | 47 | |
| 48 | [body-min-length] |
| 49 | min-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 |
| 54 | ignore-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 |