Sha256: 200f5e92b5c8ac1a2f9f69fc74e72f109e821a361ce962731f918355456df358
Contents?: true
Size: 437 Bytes
Versions: 4
Compression:
Stored size: 437 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.path} 2>&1` unless $?.success? output += staged.filter_string(syntax).lines.to_a clean = false end end return (clean ? :good : :bad), output end end end
Version data entries
4 entries across 4 versions & 1 rubygems