Sha256: 81b48659f48733596306b1045bbb65ecd81a277155651e35cb57203a0507d8cd
Contents?: true
Size: 334 Bytes
Versions: 8
Compression:
Stored size: 334 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 :fail, "Trailing whitespace detected:\n#{result.stdout}" end :pass end end end
Version data entries
8 entries across 8 versions & 2 rubygems