Sha256: d63b7446c12ef623c835b861203b389fd22863976bd607c0ab3b727d795b9441

Contents?: true

Size: 431 Bytes

Versions: 7

Compression:

Stored size: 431 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:"
      end

      def pattern
        "^[ 	]*debugger"
      end

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

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pre-commit-0.25.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.24.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.23.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.22.1 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.22.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.21.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.20.0 lib/plugins/pre_commit/checks/debugger.rb