Method: RuboCop::ConfigStore#for_dir

Defined in:
lib/rubocop/config_store.rb

#for_dir(dir) ⇒ Object


61
62
63
64
65
66
67
68
69
70
# File 'lib/rubocop/config_store.rb', line 61

def for_dir(dir)
  return @options_config if @options_config

  @path_cache[dir] ||= ConfigLoader.configuration_file_for(dir)
  path = @path_cache[dir]
  @object_cache[path] ||= begin
    print "For #{dir}: " if ConfigLoader.debug?
    ConfigLoader.configuration_from_file(path, check: validated?)
  end
end