Sha256: 53a8d7a3531e7c4b47e6b1a0b185e8e22066e42befa61ea2af4aa2a1b0101ecd

Contents?: true

Size: 327 Bytes

Versions: 14

Compression:

Stored size: 327 Bytes

Contents

module Overcommit::Hook::CommitMsg
  # Ensures commit message subject lines are followed by a blank line.
  class SingleLineSubject < Base
    def run
      unless commit_message_lines[1].to_s.strip.empty?
        return :warn, 'Subject should be one line and followed by a blank line'
      end

      :good
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
overcommit-0.14.1 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.14.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.13.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.12.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.11.1 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.11.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.10.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.9.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.8.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.7.0 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.6.3 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.6.2 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.6.1 lib/overcommit/hook/commit_msg/single_line_subject.rb
overcommit-0.6.0 lib/overcommit/hook/commit_msg/single_line_subject.rb