Module: PatchedRubocop::Inject

Defined in:
lib/ducalis/patched_rubocop/inject.rb

Constant Summary collapse

PATH =
Ducalis::DEFAULT_FILE.to_s

Class Method Summary collapse

Class Method Details

.defaults!Object



7
8
9
10
11
12
13
14
# File 'lib/ducalis/patched_rubocop/inject.rb', line 7

def self.defaults!
  hash = RuboCop::ConfigLoader.send(:load_yaml_configuration, PATH)
  config = RuboCop::Config.new(hash, PATH)
  puts "configuration from #{PATH}" if RuboCop::ConfigLoader.debug?
  config = RuboCop::ConfigLoader.merge_with_default(config, PATH)
  RuboCop::ConfigLoader
    .instance_variable_set(:@default_configuration, config)
end