Class: Standard::CreatesConfigStore::ConfiguresIgnoredPaths
- Inherits:
-
Object
- Object
- Standard::CreatesConfigStore::ConfiguresIgnoredPaths
- Defined in:
- lib/standard/creates_config_store/configures_ignored_paths.rb
Constant Summary collapse
- DEFAULT_IGNORES =
[ # Match RuboCop's defaults: https://github.com/rubocop-hq/rubocop/blob/v0.61.1/config/default.yml#L60-L63 ".git/**/*", "node_modules/**/*", "vendor/**/*", # Standard's own default ignores: "bin/*", "db/schema.rb", "tmp/**/*" ].map { |path| [path, ["AllCops"]] }.freeze
Instance Method Summary collapse
Instance Method Details
#call(options_config, standard_config) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/standard/creates_config_store/configures_ignored_paths.rb', line 14 def call(, standard_config) ignored_patterns(standard_config).each do |(path, cops)| cops.each do |cop| [cop] ||= {} [cop]["Exclude"] ||= [] [cop]["Exclude"] |= [ absolutify(standard_config[:config_root], path) ] end end end |