Method: RuboCop::Cop::Naming::PredicateName#validate_config

Defined in:
lib/rubocop/cop/naming/predicate_name.rb

#validate_configObject


141
142
143
144
145
146
147
148
149
# File 'lib/rubocop/cop/naming/predicate_name.rb', line 141

def validate_config
  forbidden_prefixes.each do |forbidden_prefix|
    next if predicate_prefixes.include?(forbidden_prefix)

    raise ValidationError, <<~MSG.chomp
      The `Naming/PredicateName` cop is misconfigured. Prefix #{forbidden_prefix} must be included in NamePrefix because it is included in ForbiddenPrefixes.
    MSG
  end
end