Sha256: 3e03af6dd7346cfd9224b7af1d745ba58d180663933def8b21f67817b965720b
Contents?: true
Size: 333 Bytes
Versions: 10
Compression:
Stored size: 333 Bytes
Contents
module Overcommit::Hook::PreCommit # Checks for trailing whitespace in files. class TrailingWhitespace < Base def run result = execute(%w[grep -IHn \s$] + applicable_files) unless result.stdout.empty? return :bad, "Trailing whitespace detected:\n#{result.stdout}" end :good end end end
Version data entries
10 entries across 10 versions & 1 rubygems