Skip to content

feat(engine): adds body character count#122

Open
sajithneyo wants to merge 1 commit intocommitizen:masterfrom
sajithneyo:master
Open

feat(engine): adds body character count#122
sajithneyo wants to merge 1 commit intocommitizen:masterfrom
sajithneyo:master

Conversation

@sajithneyo
Copy link
Copy Markdown

This PR adds a character count feedback when typing the body.

Previous =>
? Provide a longer description of the change: (press enter to skip)

Now =>

? Provide a longer description of the change (max 80 chars per line): (press enter to skip)
 (0) 

So by showing the count a rough idea can be taken when typing the commit message about where to end the line break "\n" without letting commitlint to do it automatically and also gives a basic idea about the body character count. Additionally a config "maxBodyLineWidth" can be set to show line length in the prompt reminding other developers about the line lengths configured. It defaults to 80.

If this is not suitable for the current release, please add this feature in the next release. This helped me a lot to manage and plan my commit messages nicely.

@ThisIsMissEm
Copy link
Copy Markdown

I don't think you need another configuration option here, just using maxLineWidth should be okay. The automatic wrapping actually happens in cz-conventional-commit: https://github.com/commitizen/cz-conventional-changelog/blob/master/engine.js#L206

@sajithneyo
Copy link
Copy Markdown
Author

@ThisIsMissEm updated the PR

fix(engine): removed maxBodyLineWidth  property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants