Class: MetzScan::Commands::Scan::ProjectConfigScope::ConfigLoader
- Inherits:
-
Object
- Object
- MetzScan::Commands::Scan::ProjectConfigScope::ConfigLoader
- Defined in:
- lib/metz_scan/commands/scan/project_config_scope.rb
Instance Method Summary collapse
Instance Method Details
#default_for(dir) ⇒ Object
110 111 112 113 114 |
# File 'lib/metz_scan/commands/scan/project_config_scope.rb', line 110 def default_for(dir) path = File.join(File.(dir), ".rubocop.yml") config = RuboCop::Config.new({}, path) RuboCop::ConfigLoader.merge_with_default(config, path) end |
#load(path) ⇒ Object
116 117 118 119 120 121 122 123 |
# File 'lib/metz_scan/commands/scan/project_config_scope.rb', line 116 def load(path) return RuboCop::ConfigLoader.default_configuration if path == DEFAULT_FILE config = RuboCop::Config.new(scope_hash(path), path) config.deprecation_check { || nil } config.make_excludes_absolute RuboCop::ConfigLoader.merge_with_default(config, path) end |