[ create a new paste ] login | about

Link: http://codepad.org/nSdz5JGX    [ raw code | fork ]

Tcl, pasted on Feb 14:
#!/usr/bin/tclsh
################################################################################
# TCL: isCommitMsg                                                             #
# Revision: 1                                                                  #
# Date created: 14/2/2017                                                      #
# Date last modify: 14/02/2017                                                 #
# Author: Whiskey                                                              #
################################################################################

# Open git file to read the commit
set file [open $argv r]
set massage [read $file]

# Close the open file
close $file

# Try to find any errors in commit massage
if {[regexp -nocase {^(Added|Changed|Deleted|Fixed|Improved): ((?:[a-z]+ )*[a-z]+)} $massage]} {
  puts "Wrong!, You need to work on this"
} else {
  exit 1
}


Create a new paste based on this one


Comments: