Sha256: a1ed31eae4050b09b3c29cd2c0faa129bd3398423be12e57ae869b1683c4bb6d

Contents?: true

Size: 427 Bytes

Versions: 8

Compression:

Stored size: 427 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
        'debugger'
      end

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

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pre-commit-0.16.3 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.16.2 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.16.1 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.16.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.15.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.14.1 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.14.0 lib/plugins/pre_commit/checks/debugger.rb
pre-commit-0.13.0 lib/plugins/pre_commit/checks/debugger.rb