AutismSuperman / git-commit-message-helper

A JetBrains series plugin to help git code submission specifications, support IDEA, WebStorm, AndroidStudio, PyCharm, CLoin, GoLand, PhpStorm ... https://plugins.jetbrains.com/plugin/13477-git-commit-message-helper/
Apache License 2.0
68 stars 37 forks source link

[Proposal] Change default template to avoid blank trailing spaces/lines #4

Closed tad3j closed 4 years ago

tad3j commented 4 years ago

I've noticed that the current template inserts empty lines which is kind of annoying, so I came up with a new one (doesn't add blank lines at the end of commit messages) and I wanted to share it:

#if($type)${type}#end#if($scope)(${scope})#end: #if($subject)${subject}#end
#if($body)${newline}${newline}${body}#end
#if($changes)${newline}${newline}BREAKING CHANGE: ${changes}#end
#if($closes)${newline}${newline}Closes ${closes}#end

Mostly I wrapped ${newline} inside if statements, so they only get appended there is content following.