Class: RuboCop::Cop::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/monkey_patches/team.rb

Instance Method Summary collapse

Instance Method Details

#roundup_relevant_cops(filename) ⇒ Object

START COOKSTYLE MODIFICATION



13
14
15
16
17
18
19
20
# File 'lib/rubocop/monkey_patches/team.rb', line 13

def roundup_relevant_cops(filename)
  cops.reject do |cop|
    cop.excluded_file?(filename) ||
      !support_target_ruby_version?(cop) ||
      !support_target_chef_version?(cop) ||
      !support_target_rails_version?(cop)
  end
end

#support_target_chef_version?(cop) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
# File 'lib/rubocop/monkey_patches/team.rb', line 6

def support_target_chef_version?(cop)
  return true unless cop.class.respond_to?(:support_target_chef_version?)

  cop.class.support_target_chef_version?(cop.target_chef_version)
end