Sha256: f603414906e45717452b2877d93a325dc716a019e04bd3defa3bdf84beca3a35
Contents?: true
Size: 504 Bytes
Versions: 3
Compression:
Stored size: 504 Bytes
Contents
require 'open3' require 'pre-commit/checks/plugin' module PreCommit module Checks class Coffeelint < Plugin def call(staged_files) staged_files = staged_files.grep(/\.coffee$/) return if staged_files.empty? args = staged_files.join(' ') stdout, stderr, result = Open3.capture3("coffeelint #{args}") stdout + stderr unless result.success? end def self.description "Runs coffeelint to detect errors" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pre-commit-0.14.1 | lib/plugins/pre_commit/checks/coffeelint.rb |
pre-commit-0.14.0 | lib/plugins/pre_commit/checks/coffeelint.rb |
pre-commit-0.13.0 | lib/plugins/pre_commit/checks/coffeelint.rb |