ramsey/conventional-commits

Improve captainhook validation error message

aprat84 opened this issue · 1 comments

Right now, all errors are the same:

 [ERROR] Invalid Commit Message                                                 
         The commit message is not properly formatted according to the          
         Conventional Commits specification. For more details, see              
         https://www.conventionalcommits.org/en/v1.0.0/

It would be nice to echo the parser error, so we have a hint of what we did wrong. Example:

 [ERROR] Invalid Commit Message: 'asdf' is not one of the valid types 'feat, fix, refactor, ...'
         The commit message is not properly formatted according to the          
         Conventional Commits specification. For more details, see              
         https://www.conventionalcommits.org/en/v1.0.0/

Well its not usable for me because of this. If The first error already says nothing, and I just see a huge regex when I am looking into the code, I can leave it. Sorry. It was looking really promising