Sha256: 2b65bd619bd8ad80ff2c5a015011ec774a944b97a53342d0ddc652f0e168c71e

Contents?: true

Size: 323 Bytes

Versions: 11

Compression:

Stored size: 323 Bytes

Contents

module Overcommit::Hook::CommitMsg
  # Checks for hard tabs in commit messages.
  class HardTabs < Base
    def run
      # Catches hard tabs entered by the user (not auto-generated)
      if commit_message.index(/\t/)
        return :warn, "Don't use hard tabs in commit messages"
      end

      :pass
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
overcommit-0.24.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.23.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.22.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
jawshooah-overcommit-0.22.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.21.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.20.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.19.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.18.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.17.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.16.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.15.0 lib/overcommit/hook/commit_msg/hard_tabs.rb