File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,17 @@ def __call__(self):
5050 raise NoCommitsFoundError (f"No commit found with range: '{ self .rev_range } '" )
5151
5252 pattern = self .cz .schema_pattern ()
53+ ill_formated_commits = []
5354 for commit_msg in commit_msgs :
5455 if not Check .validate_commit_message (commit_msg , pattern ):
55- raise InvalidCommitMessageError (
56- "commit validation: failed!\n "
57- "please enter a commit message in the commitizen format.\n "
58- f"commit: { commit_msg } \n "
59- f"pattern: { pattern } "
60- )
56+ ill_formated_commits .append (f"commit: { commit_msg } \n " )
57+ if ill_formated_commits != []:
58+ raise InvalidCommitMessageError (
59+ "commit validation: failed!\n "
60+ "please enter a commit message in the commitizen format.\n "
61+ f"{ '' .join (ill_formated_commits )} \n "
62+ f"pattern: { pattern } "
63+ )
6164 out .success ("Commit validation: successful!" )
6265
6366 def _get_commit_messages (self ):
You can’t perform that action at this time.
0 commit comments