Sha256: b30830eba72036548c678abd4e003a7dcebe9424317cbf766c6580f4a99e4e30

Contents?: true

Size: 361 Bytes

Versions: 31

Compression:

Stored size: 361 Bytes

Contents

module Overcommit::Hook::CommitMsg
  # Checks for hard tabs in commit messages.
  class HardTabs < Base
    def run
      return :pass if empty_message?

      # 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

31 entries across 29 versions & 2 rubygems

Version Path
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook/commit_msg/hard_tabs.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook/commit_msg/hard_tabs.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook/commit_msg/hard_tabs.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.46.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.45.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.44.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.43.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.42.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.41.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.40.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.39.1 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.39.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.38.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.37.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.36.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.35.0 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.34.2 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.34.1 lib/overcommit/hook/commit_msg/hard_tabs.rb
overcommit-0.34.0 lib/overcommit/hook/commit_msg/hard_tabs.rb