Sha256: 4df9187e2b226fd6af42ffc9f2817649819bbc24a531b5facf822dbe09c2d4db
Contents?: true
Size: 700 Bytes
Versions: 23
Compression:
Stored size: 700 Bytes
Contents
require 'pre-commit/checks/shell' module PreCommit module Checks class Coffeelint < Shell def call(staged_files) staged_files = staged_files.grep(/\.coffee$/) return if staged_files.empty? result = in_groups(staged_files).map do |files| args = %w{coffeelint} + config_file_flag + files execute(args) end.compact result.empty? ? nil : result.join("\n") end def config_file_flag config_file ? ['-f', config_file] : [] end def alternate_config_file 'coffeelint.json' end def self.description "Runs coffeelint to detect errors" end end end end
Version data entries
23 entries across 23 versions & 1 rubygems