Module: RuboCop::GitHub::Inject
- Defined in:
- lib/rubocop/github/inject.rb
Overview
Because RuboCop doesn’t yet support plugins, we have to monkey patch in a bit of our configuration. Borrowed from: github.com/rubocop/rubocop-rails/blob/f36121946359615a26c9a941763abd1470693e8d/lib/rubocop/rails/inject.rb
Class Method Summary collapse
Class Method Details
._load_config(path) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/rubocop/github/inject.rb', line 17 def self._load_config(path) path = path.to_s hash = ConfigLoader.send(:load_yaml_configuration, path) config = Config.new(hash, path).tap(&:make_excludes_absolute) puts "configuration from #{path}" if ConfigLoader.debug? config = ConfigLoader.merge_with_default(config, path, unset_nil: false) ConfigLoader.instance_variable_set(:@default_configuration, config) end |
.default_defaults! ⇒ Object
9 10 11 |
# File 'lib/rubocop/github/inject.rb', line 9 def self.default_defaults! _load_config(CONFIG_DEFAULT) end |
.rails_defaults! ⇒ Object
13 14 15 |
# File 'lib/rubocop/github/inject.rb', line 13 def self.rails_defaults! _load_config(CONFIG_RAILS) end |