Sha256: 1abd02703c6e6c4b3d577fc73f2f471ca03600d38dbf3fceb111f134b1db40a1
Contents?: true
Size: 410 Bytes
Versions: 8
Compression:
Stored size: 410 Bytes
Contents
module Overcommit::GitHook class RubySyntax < HookSpecificCheck include HookRegistry file_type :rb def run_check clean = true output = [] staged.each do |staged| syntax = `ruby -c #{staged} 2>&1` unless $?.success? output += syntax.lines.to_a clean = false end end return (clean ? :good : :bad), output end end end
Version data entries
8 entries across 8 versions & 1 rubygems