Sha256: f987049527394c82ceb1a98f00723652eb231646c9fe713f08db91c7d83aebe9

Contents?: true

Size: 327 Bytes

Versions: 14

Compression:

Stored size: 327 Bytes

Contents

module Overcommit::Hook::CommitMsg
  # Ensures commit message subject lines do not have a trailing period
  class TrailingPeriod < Base
    def run
      if commit_message_lines.first.rstrip.end_with?('.')
        return :warn, 'Please omit trailing period from commit message subject'
      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/trailing_period.rb
overcommit-0.14.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.13.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.12.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.11.1 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.11.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.10.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.9.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.8.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.7.0 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.6.3 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.6.2 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.6.1 lib/overcommit/hook/commit_msg/trailing_period.rb
overcommit-0.6.0 lib/overcommit/hook/commit_msg/trailing_period.rb