@@ -46,33 +46,43 @@ Conventional Commit......................................................Failed
4646- duration: 0.07s
4747- exit code: 1
4848
49- [Bad Commit message] >> add a new feature
50-
49+ [Bad commit message] >> add a new feature
5150Your commit message does not follow Conventional Commits formatting
5251https://www.conventionalcommits.org/
52+ ` ` `
53+
54+ And with the `--verbose` arg :
5355
54- Conventional Commits start with one of the below types, followed by a colon,
55- followed by the commit message:
56+ ` ` ` console
57+ $ git commit -m "add a new feature"
5658
57- build chore ci docs feat fix perf refactor revert style test
59+ [INFO] Initializing environment for ....
60+ Conventional Commit......................................................Failed
61+ - hook id: conventional-pre-commit
62+ - duration: 0.07s
63+ - exit code: 1
5864
59- Example commit message adding a feature:
65+ [Bad commit message] >> add a new feature
66+ Your commit message does not follow Conventional Commits formatting
67+ https://www.conventionalcommits.org/
6068
61- feat: implement new API
69+ Conventional Commit messages follow a pattern like:
6270
63- Example commit message fixing an issue:
71+ type(scope): subject
6472
65- fix: remove infinite loop
73+ extended body
6674
67- Example commit with scope in parentheses after the type for more context :
75+ Please correct the following errors :
6876
69- fix(account): remove infinite loop
77+ - Expected value for 'type' but found none.
78+ - Expected value for 'delim' but found none.
79+ - Expected value for 'subject' but found none.
7080
71- Example commit with a body :
81+ Run :
7282
73- fix: remove infinite loop
83+ git commit --edit --file=.git/COMMIT_EDITMSG
7484
75- Additional information on the issue caused by the infinite loop
85+ to edit the commit message and retry the commit.
7686` ` `
7787
7888Make a (conventional) commit :heavy_check_mark: :
@@ -129,7 +139,7 @@ print(is_conventional("custom: this is a conventional commit", types=["custom"])
129139
130140` ` ` shell
131141$ conventional-pre-commit -h
132- usage: conventional-pre-commit [-h] [--force-scope] [--scopes SCOPES] [--strict] [types ...] input
142+ usage: conventional-pre-commit [-h] [--no-color] [-- force-scope] [--scopes SCOPES] [--strict] [--verbose ] [types ...] input
133143
134144Check a git commit message for Conventional Commits formatting.
135145
@@ -139,9 +149,11 @@ positional arguments:
139149
140150options:
141151 -h, --help show this help message and exit
152+ --no-color Disable color in output.
142153 --force-scope Force commit to have scope defined.
143154 --scopes SCOPES Optional list of scopes to support. Scopes should be separated by commas with no spaces (e.g. api,client)
144155 --strict Force commit to strictly follow Conventional Commits formatting. Disallows fixup! style commits.
156+ --verbose Print more verbose error output.
145157` ` `
146158
147159Supply arguments on the command-line, or via the pre-commit `hooks.args` property :
0 commit comments