.gitlint 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Edit this file as you like.
  2. #
  3. # All these sections are optional. Each section with the exception of [general] represents
  4. # one rule and each key in it is an option for that specific rule.
  5. #
  6. # Rules and sections can be referenced by their full name or by id. For example
  7. # section "[body-max-line-length]" could also be written as "[B1]". Full section names are
  8. # used in here for clarity.
  9. #
  10. [general]
  11. # Ignore certain rules, this example uses both full name and id
  12. ignore=title-trailing-punctuation, T1, T2, T3, T4, T5, T6, T8, B1, B2, B3, B4, B5, B6, B7, B8
  13. # verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
  14. # verbosity = 2
  15. # By default gitlint will ignore merge, revert, fixup and squash commits.
  16. # ignore-merge-commits=true
  17. # ignore-revert-commits=true
  18. # ignore-fixup-commits=true
  19. # ignore-squash-commits=true
  20. # Ignore any data send to gitlint via stdin
  21. # ignore-stdin=true
  22. # Fetch additional meta-data from the local repository when manually passing a
  23. # commit message to gitlint via stdin or --commit-msg. Disabled by default.
  24. # staged=true
  25. # Enable debug mode (prints more output). Disabled by default.
  26. # debug=true
  27. # Enable community contributed rules
  28. # See http://jorisroovers.github.io/gitlint/contrib_rules for details
  29. # contrib=contrib-title-conventional-commits,CC1
  30. # Set the extra-path where gitlint will search for user defined rules
  31. # See http://jorisroovers.github.io/gitlint/user_defined_rules for details
  32. # extra-path=examples/
  33. # This is an example of how to configure the "title-max-length" rule and
  34. # set the line-length it enforces to 80
  35. # [title-max-length]
  36. # line-length=50
  37. # Conversely, you can also enforce minimal length of a title with the
  38. # "title-min-length" rule:
  39. # [title-min-length]
  40. # min-length=5
  41. # [title-must-not-contain-word]
  42. # Comma-separated list of words that should not occur in the title. Matching is case
  43. # insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
  44. # will not cause a violation, but "WIP: my title" will.
  45. # words=wip
  46. [title-match-regex]
  47. # python-style regex that the commit-msg title must match
  48. # Note that the regex can contradict with other rules if not used correctly
  49. # (e.g. title-must-not-contain-word).
  50. regex=^(feat|fix|docs|style|refactor|test|build|ci|revert|chore|perf)(\(.+\))*: .+
  51. # [body-max-line-length]
  52. # line-length=72
  53. # [body-min-length]
  54. # min-length=5
  55. # [body-is-missing]
  56. # Whether to ignore this rule on merge commits (which typically only have a title)
  57. # default = True
  58. # ignore-merge-commits=false
  59. # [body-changed-file-mention]
  60. # List of files that need to be explicitly mentioned in the body when they are changed
  61. # This is useful for when developers often erroneously edit certain files or git submodules.
  62. # By specifying this rule, developers can only change the file when they explicitly reference
  63. # it in the commit message.
  64. # files=gitlint/rules.py,README.md
  65. # [body-match-regex]
  66. # python-style regex that the commit-msg body must match.
  67. # E.g. body must end in My-Commit-Tag: foo
  68. # regex=My-Commit-Tag: foo$
  69. # [author-valid-email]
  70. # python-style regex that the commit author email address must match.
  71. # For example, use the following regex if you only want to allow email addresses from foo.com
  72. # regex=[^@]+@foo.com
  73. [ignore-by-title]
  74. # Ignore certain rules for commits of which the title matches a regex
  75. # E.g. Match commit titles that start with "Release"
  76. # regex=^Release(.*)
  77. # Ignore certain rules, you can reference them by their id or by their full name
  78. # Use 'all' to ignore all rules
  79. # ignore=T1,body-min-length
  80. [ignore-by-body]
  81. # Ignore certain rules for commits of which the body has a line that matches a regex
  82. # E.g. Match bodies that have a line that that contain "release"
  83. # regex=(.*)release(.*)
  84. #
  85. # Ignore certain rules, you can reference them by their id or by their full name
  86. # Use 'all' to ignore all rules
  87. # ignore=T1,body-min-length
  88. # [ignore-body-lines]
  89. # Ignore certain lines in a commit body that match a regex.
  90. # E.g. Ignore all lines that start with 'Co-Authored-By'
  91. # regex=^Co-Authored-By
  92. # This is a contrib rule - a community contributed rule. These are disabled by default.
  93. # You need to explicitly enable them one-by-one by adding them to the "contrib" option
  94. # under [general] section above.
  95. # [contrib-title-conventional-commits]
  96. # Specify allowed commit types. For details see: https://www.conventionalcommits.org/
  97. # types = bugfix,user-story,epic