Sha256: 4ffc1866312669329f109f27af22893fde4936dc512190e2b6e1202129b11140

Contents?: true

Size: 303 Bytes

Versions: 2

Compression:

Stored size: 303 Bytes

Contents

module Overcommit::Hook::PreCommit
  # Checks for trailing whitespace in files.
  class TrailingWhitespace < Base
    def run
      result = execute(command + applicable_files)

      extract_messages(
        result.stdout.split("\n"),
        /^(?<file>[^:]+):(?<line>\d+)/,
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
overcommit-0.26.0 lib/overcommit/hook/pre_commit/trailing_whitespace.rb
overcommit-0.25.0 lib/overcommit/hook/pre_commit/trailing_whitespace.rb