lib/scss_lint/config.rb in scss_lint-0.57.1 vs lib/scss_lint/config.rb in scss_lint-0.58.0
- old
+ new
@@ -62,13 +62,13 @@
if yaml = YAML.load(file_contents)
yaml.to_hash
else
{}
end
- rescue StandardError => ex
+ rescue StandardError => e
raise SCSSLint::Exceptions::InvalidConfiguration,
- "Invalid configuration: #{ex.message}"
+ "Invalid configuration: #{e.message}"
end
options = convert_single_options_to_arrays(options)
options = merge_wildcard_linter_options(options)
options = ensure_exclude_paths_are_absolute(options, file)
@@ -92,19 +92,16 @@
end
# Merge options from wildcard linters into individual linter configs
def merge_wildcard_linter_options(options)
options = options.dup
-
- # rubocop:disable Performance/HashEachMethods (FALSE POSITIVE)
# Cannot use `each_key` because the cycle adds new keys during iteration
options.fetch('linters', {}).keys.each do |class_name|
next unless class_name.include?('*')
wildcard_options = options['linters'].delete(class_name)
apply_options_to_matching_linters(class_name, options, wildcard_options)
end
- # rubocop:enable Performance/HashEachMethods
options
end
def apply_options_to_matching_linters(class_name_glob, current_options, linter_options)