Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicated elements from AllCops.Exclude #5

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

r7kamura
Copy link
Contributor

@r7kamura r7kamura commented Dec 30, 2023

Summary

Some elements are already configured by default, so you do not need to configure these at rubocop-rails-omakase side.

If you intentionally have duplicated elements, feel free to close this pull request.

Details

rubocop side

The following elements are configured in rubocop:

  • 'node_modules/**/*'
  • 'tmp/**/*'
  • 'vendor/**/*'
  • '.git/**/*'

https://github.com/rubocop/rubocop/blob/v1.59.0/config/default.yml#L65-L69

rubocop-rails side

The following elements are configured in rubocop-rails:

  • app/assets/**/*
  • bin/*
  • db/*schema.rb
  • log/**/*
  • public/**/*
  • storage/**/*

https://github.com/rubocop/rubocop-rails/blob/v2.23.1/config/default.yml#L8-L16

Verification

The following command can be used to verify that the configuration remain the same after the change:

$ ruby -r rubocop -e 'pp RuboCop::ConfigLoader.configuration_from_file("rubocop.yml")["AllCops"]["Exclude"]'
["/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/node_modules/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/tmp/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/vendor/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/.git/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/app/assets/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/bin/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/db/*schema.rb",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/log/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/public/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/storage/**/*",
 "/home/r7kamura/ghq/github.com/rails/rubocop-rails-omakase/data/**/*"]

@dhh dhh merged commit 4f7b57d into rails:main Dec 30, 2023
@r7kamura r7kamura deleted the all-cops-exclude-redundant branch December 30, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants