module Overcommit::Hook::CommitMsg
  # Ensures commit message subject lines are followed by a blank line.
  class CapitalizedSubject < Base
    def run
      first_letter = commit_message_lines[0].to_s.match(/^[[:punct:]]*(.)/)[1]
      unless first_letter.match(/[[:upper:]]/)
        return :warn, 'Subject should start with a capital letter'
      end

      :pass
    end
  end
end

module Overcommit::Hook::CommitMsg
  # Ensures commit message subject lines start with a capital letter.
  class CapitalizedSubject < Base
    def run
      first_letter = commit_message_lines[0].to_s.match(/^[[:punct:]]*(.)/)[1]
      unless first_letter.match(/[[:upper:]]/)
        return :warn, 'Subject should start with a capital letter'
      end

      :pass
    end
  end
end

Fix comment in CapitalizedSubject hook
Fix comment in CapitalizedSubject hook

This was leftover from the hook I copied when creating it.

Change-Id: I3be089503b7eaf90f256d2ce03a10bf8fec7b1f4
Reviewed-on: http://gerrit.causes.com/47740
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@brigade.com>
Reviewed-by: Joe Lencioni <1dd72cf724deaab5db236f616560fc7067b734e1@brigade.com>
