ramsey / conventional-commits

:yo_yo: A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook plugin!
MIT License
178 stars 19 forks source link

Improve captainhook validation error message #55

Open aprat84 opened 1 year ago

aprat84 commented 1 year ago

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/
daCyberpunk commented 7 months ago

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