1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Commit Message Validation Configuration Template
# The Conventional Commits specification is a lightweight convention on top of commit messages.
# For detailed content, please refer to: https://www.conventionalcommits.org/en/v1.0.0/#summary
# The commit message should be structured as follows:
#
# ╔═════════════════════════════════════════════════╗
# ║ COMMIT FORMAT TEMPLATE ║
# ╠═════════════════════════════════════════════════╣
# ║ type(optional scope): subject ║
# ║ ║
# ║ [optional body] ║
# ║ ║
# ║ [optional footer] ║
# ║ - BREAKING CHANGE: xxxxx ║
# ║ - Closes #issue ║
# ╚═════════════════════════════════════════════════╝
#
# Structure explanation:
# 1. type → Required, commit type (feat/fix/docs etc.)
# 2. scope → Optional, scope (wrapped in parentheses)
# 3. subject → Required, brief description (space after colon)
# 4. body → Optional, detailed description (blank line after header)
# 5. footer → Optional, notes (blank line after body)
# You can optionally modify, delete, or comment out the options that do not require validation.
[]
= "1.0.0"
= true
# Skip validation when the first line of the commit message
# is the following keywords.
= [
"--no-verify",
"SKIP",
]
[]
# Header section validation
# Includes type, scope, and subject checks
# Breaking change detection:
# If `!` is added before the subject, it indicates a breaking change.
# Example: `refactor(parser)!: change public API`
[]
# Type validation module
= [
"feat", # New feature
"fix", # Bug fix
"docs", # Documentation
"style", # Code style
"refactor", # Code refactor
"test", # Test related
"chore", # Maintenance
]
[]
# Scope validation module
= false
= [
"core",
"cli",
"ui",
"docs",
"test",
]
# Subject validation module
[]
= 1
= true # Forbid ending with a period
= 2 # Default min_length is 2
= 72 # Default max_length is 72
[]
= false
= 1
= true
= 2
= 72
[]
# Footer section is distinguished from the body by specific keywords.
# When one of the start keywords appears, the following lines are treated as footer content.
# Common keywords include BREAKING CHANGE, Closes, Fixes, Signed-off-by.
= ["BREAKING CHANGE", "Closes", "Fixes", "Signed-off-by"]
= 1
= 2
= 72
= true