Method: PreCommit::Checks::GoBuild#call
- Defined in:
- lib/plugins/pre_commit/checks/go_build.rb
#call(staged_files) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/plugins/pre_commit/checks/go_build.rb', line 7 def call(staged_files) staged_files = staged_files.grep(/\.go$/) return if staged_files.empty? errors = staged_files.map { |file| run_check(file) }.compact return if errors.empty? errors.join("\n") end |