File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,16 @@ def validate_commit_message(
123123        if  max_msg_length :
124124            msg_len  =  len (commit_msg .partition ("\n " )[0 ].strip ())
125125            if  msg_len  >  max_msg_length :
126-                 return  ValidationResult (False , [])
127-         return  ValidationResult (bool (re .match (pattern , commit_msg )), [])
126+                 return  ValidationResult (
127+                     False ,
128+                     [
129+                         f"The commit message subject is too long ({ msg_len } { max_msg_length }  
130+                     ],
131+                 )
132+         return  ValidationResult (
133+             bool (re .match (pattern , commit_msg )),
134+             [f"The commit message does not match the pattern: { pattern }  ],
135+         )
128136
129137    def  format_exception_message (
130138        self , ill_formated_commits : list [tuple [git .GitCommit , list ]]
Original file line number Diff line number Diff line change 1- from commitizen import BaseCommitizenCustomizing  commitizen is not hard at all.
1+ Customizing  commitizen is not hard at all.
22We have two different ways to do so.
33
44## 1. Customize in configuration file  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments