Sha256: 607478a5de6881b70609bca81ee4bdde30a59be87c17df43508d039f2ec00f73

Contents?: true

Size: 463 Bytes

Versions: 11

Compression:

Stored size: 463 Bytes

Contents

require 'pre-commit/checks/grep'

module PreCommit
  module Checks
    class BeforeAll < Grep

      def files_filter(staged_files)
        staged_files.grep(/\.rb$/)
      end

      def extra_grep
        " | grep -v \/\/"
      end

      def message
        "before(:all) found:\n"
      end

      def pattern
        '-e "before.*:all"'
      end

      def self.description
        "Find ruby files with 'before :all' pattern"
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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