vendor/jruby/1.9/gems/rubocop-0.25.0/lib/rubocop/config.rb
def validate
      # Don't validate RuboCop's own files. Avoids inifinite recursion.
      return if @loaded_path.start_with?(File.join(ConfigLoader::RUBOCOP_HOME,
                                                   'config'))

      default_config = ConfigLoader.default_configuration

      valid_cop_names, invalid_cop_names = @hash.keys.partition do |key|
        default_config.key?(key)
      end

      invalid_cop_names.each do |name|
        fail ValidationError,
             "unrecognized cop #{name} found in #{loaded_path || self}"
      end

      valid_cop_names.each do |name|
        @hash[name].each_key do |param|
          next if COMMON_PARAMS.include?(param) ||
            default_config[name].key?(param)

          fail ValidationError,
               "unrecognized parameter #{name}:#{param} found " \
               "in #{loaded_path || self}"
        end
      end
    end
# TODO: This should be a private method
This should be a private method
This should be a private method
def validate
      return if @loaded_path.start_with?(File.join(ConfigLoader::RUBOCOP_HOME,
                                                   'config'))
      default_config = ConfigLoader.default_configuration
      valid_cop_names, invalid_cop_names = @hash.keys.partition do |key|
        default_config.key?(key)
      end
      invalid_cop_names.each do |name|
        fail ValidationError,
             "unrecognized cop #{name} found in #{loaded_path || self}"
      end
      valid_cop_names.each do |name|
        @hash[name].each_key do |param|
          next if COMMON_PARAMS.include?(param) ||
            default_config[name].key?(param)
          fail ValidationError,
               "unrecognized parameter #{name}:#{param} found " \
               "in #{loaded_path || self}"
        end
      end
    end
def validate return if @loaded_path . start_with? ( File . join ( ConfigLoader :: RUBOCOP_HOME , 'config' ) ) default_config = ConfigLoader . default_configuration valid_cop_names , invalid_cop_names = @hash . keys . partition do | key | default_config . key? ( key ) end invalid_cop_names . each do | name | fail ValidationError , "unrecognized cop #{name} found in #{loaded_path || self}" end valid_cop_names . each do | name | @hash [ name ] . each_key do | param | next if COMMON_PARAMS . include? ( param ) || default_config [ name ] . key? ( param ) fail ValidationError , "unrecognized parameter #{name}:#{param} found " "in #{loaded_path || self}" end end end
TODO: This should be a private method
TODO : This should be a private method
# Don't validate RuboCop's own files. Avoids inifinite recursion.