Sha256: 3a3fbd14d20ede4044af1ab384d18fbb632022db52c5bf4d53f043ae267ce5c4
Contents?: true
Size: 497 Bytes
Versions: 24
Compression:
Stored size: 497 Bytes
Contents
#!/usr/bin/env ruby # Code modified from: https://gist.github.com/hanloong/9849098 require 'English' changed_files = `git diff --name-only --cached --diff-filter=ACM`.split(%r{\n}) changed_files = changed_files.select { |file_name| File.extname(file_name) == '.rb' }.join(' ') system("bundle exec rubocop -a #{changed_files}") unless changed_files.empty? if $CHILD_STATUS.to_s[-1].to_i.zero? && !changed_files.empty? system("git add #{changed_files}") end exit $CHILD_STATUS.to_s[-1].to_i
Version data entries
24 entries across 24 versions & 1 rubygems
Version | Path |
---|---|
puppet-resource_api-1.5.0 | contrib/pre-commit |
puppet-resource_api-1.4.2 | contrib/pre-commit |
puppet-resource_api-1.4.1 | contrib/pre-commit |
puppet-resource_api-1.4.0 | contrib/pre-commit |