Skip to content

Commit c300b70

Browse files
committed
docs(config): add message length limit configuration option
1 parent 6828582 commit c300b70

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

commitizen/commands/commit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def _prompt_commit_questions(self) -> str:
8282
message = cz.message(answers)
8383
message_len = len(message.partition("\n")[0].strip())
8484

85-
8685
message_length_limit = self.arguments.get("message_length_limit")
8786
if message_length_limit is None:
8887
message_length_limit = self.config.settings.get("message_length_limit", 0)

docs/config.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ Default: `false`
119119

120120
Disallow empty commit messages, useful in CI. [Read more][allow_abort]
121121

122+
### `message_length_limit`
123+
124+
Type: `int`
125+
126+
Default: `0`
127+
128+
Maximum length of the commit message. Setting it to `0` disables the length limit. It can be overridden by the `-l/--message-length-limit` command line argument.
129+
122130
### `allowed_prefixes`
123131

124132
Type: `list`

0 commit comments

Comments
 (0)