Sha256: 21a06da5e6208e68df3f2cb5718f5f754e0a56aada52ba633cf09d5248836738

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 Bytes

Contents

require 'pre-commit/checks/grep'

module PreCommit
  module Checks
    class Debugger < Grep

      def files_filter(staged_files)
        staged_files.reject { |file| File.basename(file) =~ /^Gemfile/ }
      end

      def message
        "debugger statement(s) found:\n"
      end

      def pattern
        '-e "^[ 	]*debugger"'
      end

      def self.description
        "Finds files with 'debuger'."
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pre-commit-0.19.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.18.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.17.0 lib/plugins/pre_commit/checks/debugger.rb