dotfiles/script/validatecommit.rb

10 lines
193 B
Ruby

#!/usr/bin/env ruby
#
# frozen_string_literal: true
msg = File.read(ARGV[0])
unless /\A[[:upper:]]/.match?(msg)
puts 'Commit message does not start with an uppercase character'
exit 1
end