3 4 5 6 7 8
# File 'lib/pre-commit/checks/debugger_check.rb', line 3 def self.call(staged_files) return if staged_files.empty? errors = `#{Utils.grep} debugger #{staged_files.join(" ")}`.strip return unless $?.success? "debugger statement(s) found:\n#{errors}" end