dotfiles/script/validatecommit.rb

10 lines
193 B
Ruby
Raw Normal View History

2021-03-29 13:09:50 +00:00
#!/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