@@ -11,13 +11,16 @@ commitlint checks if your commit messages meets the [conventional commit format]
11
11
- [ Using go] ( #using-go )
12
12
- [ Enable in Git Repo] ( #enable-in-git-repo )
13
13
- [ Quick Test] ( #quick-test )
14
- - [ Custom config for each repo] ( #custom-config-for-each-repo )
15
- - [ Benefits of using commitlint] ( #benefits-of-using-commitlint )
16
- - [ Commit Types] ( #commit-types )
14
+ - [ Benefits of using conventional commit] ( #benefits-of-using-conventional-commit )
15
+ - [ Commit Types] ( #commit-types )
16
+ - [ Commands] ( #commands )
17
+ * [ Custom config for each repo] ( #custom-config-for-each-repo )
18
+ * [ Verify config file] ( #verify-config-file )
19
+ - [ Rules] ( #rules )
17
20
- [ Library] ( #library )
18
21
- [ Config Precedence] ( #config-precedence )
19
- - [ Message Precedence] ( #message-precedence )
20
- - [ Default Config] ( #default-config )
22
+ - [ Commit Message Precedence] ( #commit- message-precedence )
23
+ - [ Default Config] ( #default-config )
21
24
- [ License] ( #license )
22
25
23
26
### Installation
@@ -58,19 +61,20 @@ echo "feat: good commit message" | commitlint lint
58
61
# ✔ commit message
59
62
```
60
63
61
- ### Custom config for each repo
64
+ ### Benefits of using conventional commit
62
65
63
- - run ` commitlint create config ` in repo root directory
64
-
65
- this will create ` commitlint.yaml ` in that directory, you can customise the config to your need
66
+ - Conventional Commit format. Read [ Full Specification here ] ( https://www.conventionalcommits.org/en/v1.0.0/#specification )
67
+ ```
68
+ <type>[optional scope]: <description>
66
69
67
- - run ` commitlint verify ` to verify if config is valid or not
70
+ [optional body]
68
71
69
- ### Benefits of using commitlint
72
+ [optional footer(s)]
73
+ ```
70
74
71
75
- [ Why Use Conventional Commits] ( https://www.conventionalcommits.org/en/v1.0.0/#why-use-conventional-commits )
72
76
73
- ### Commit Types
77
+ #### Commit Types
74
78
75
79
Commonly used commit types from [ Conventional Commit Types] ( https://github.com/commitizen/conventional-commit-types )
76
80
@@ -89,6 +93,45 @@ Commonly used commit types from [Conventional Commit Types](https://github.com/c
89
93
| revert | Reverts a previous commit |
90
94
| merge | Merges a branch |
91
95
96
+ ### Commands
97
+
98
+ ##### Custom config for each repo
99
+
100
+ - run ` commitlint create config ` in repo root directory
101
+
102
+ this will create ` commitlint.yaml ` in that directory, you can customise the config to your need
103
+
104
+ ##### Verify config file
105
+
106
+ - run ` commitlint verify ` to verify if config is valid or not (according to config precedence)
107
+
108
+ - run ` commitlint verify --config=/path/to/conf.yaml ` to verify given config file
109
+
110
+ ### Rules
111
+
112
+ The list of available lint rules
113
+
114
+ | name | argument | flags | description |
115
+ | ---------------------- | -------- | ----------------- | -------------------------------------------- |
116
+ | header-min-length | int | n/a | checks the min length of header (first line) |
117
+ | header-max-length | int | n/a | checks the max length of header (first line) |
118
+ | body-max-line-length | int | n/a | checks the max length of each line in body |
119
+ | footer-max-line-length | int | n/a | checks the max length of each line in footer |
120
+ | type-enum | [ ] string | n/a | restrict type to given list of string |
121
+ | scope-enum | [ ] string | allow-empty: bool | restrict scope to given list of string |
122
+ | type-min-length | int | n/a | checks the min length of type |
123
+ | type-max-length | int | n/a | checks the max length of type |
124
+ | scope-min-length | int | n/a | checks the min length of scope |
125
+ | scope-max-length | int | n/a | checks the max length of scope |
126
+ | description-min-length | int | n/a | checks the min length of description |
127
+ | description-max-length | int | n/a | checks the max length of description |
128
+ | body-min-length | int | n/a | checks the min length of body |
129
+ | body-max-length | int | n/a | checks the max length of body |
130
+ | footer-min-length | int | n/a | checks the min length of footer |
131
+ | footer-max-length | int | n/a | checks the max length of footer |
132
+ | type-charset | string | n/a | restricts type to given charset |
133
+ | scope-charset | string | n/a | restricts scope to given charset |
134
+
92
135
### Library
93
136
94
137
#### Config Precedence
@@ -97,13 +140,13 @@ Commonly used commit types from [Conventional Commit Types](https://github.com/c
97
140
- config file passed with ` --config ` command-line argument
98
141
- [ default config] ( #default-config )
99
142
100
- #### Message Precedence
143
+ #### Commit Message Precedence
101
144
102
- - ` stdin ` stream
145
+ - ` stdin ` pipe stream
103
146
- commit message file passed with ` --message ` command-line argument
104
147
- ` .git/COMMIT_EDITMSG ` in current directory
105
148
106
- #### Default Config
149
+ ### Default Config
107
150
108
151
``` yaml
109
152
formatter : default
0 commit comments