class Standard::CreatesConfigStore::ConfiguresIgnoredPaths
def absolute?(path)
def absolute?(path) path =~ %r{\A([A-Z]:)?/} end
def absolutify(config_root, path)
def absolutify(config_root, path) if !absolute?(path) File.expand_path(File.join(config_root || Dir.pwd, path)) else path end end
def call(options_config, standard_config)
def call(options_config, standard_config) ignored_patterns(standard_config).each do |(path, cops)| cops.each do |cop| options_config[cop] ||= {} options_config[cop]["Exclude"] ||= [] options_config[cop]["Exclude"] |= [ absolutify(standard_config[:config_root], path) ] end end end
def ignored_patterns(standard_config)
def ignored_patterns(standard_config) (standard_config[:default_ignores] ? DEFAULT_IGNORES : []) + standard_config[:ignore] end