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

Add db/schema.rb to the excluded files #166

Closed
fidalgo opened this issue Dec 5, 2019 · 2 comments
Closed

Add db/schema.rb to the excluded files #166

fidalgo opened this issue Dec 5, 2019 · 2 comments

Comments

@fidalgo
Copy link
Contributor

fidalgo commented Dec 5, 2019

The file db/schema.rb could be added to the excluded files, because we do not want Rubocop messing with that file.
In my projects I need to add:

AllCops:
  Exclude:
    - db/schema.rb

and I guess other users too. So I'm asking if we can make it a rule.

@andyw8
Copy link
Contributor

andyw8 commented Dec 6, 2019

👍

I think the bin/ directory should also be ignored by default, since it's expected to contained auto-generated binstubs.

fidalgo added a commit to fidalgo/rubocop-rails that referenced this issue Dec 6, 2019
Since these files are generated by Rails, Rucocop should not
report offenses on them.

Fixes rubocop#166
fidalgo added a commit to fidalgo/rubocop-rails that referenced this issue Dec 6, 2019
Since these files are generated by Rails, Rucocop should not
report offenses on them.

Fixes rubocop#166
@koic
Copy link
Member

koic commented Dec 6, 2019

Not all files contained in the bin directory are automatically generated.
For example, bin/setup is expected to be edited by users.

 # This script is a way to setup or update your development environment automatically.
 # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
 # Add necessary setup steps to this file.

https://github.com/rails/rails/blob/v6.0.2.rc1/railties/lib/rails/generators/rails/app/templates/bin/setup.tt#L13

For this reason, there is a possibility that an offense that cannot be detected may be encountered but let's see what happens when we exclude the entire bin directory.

fidalgo added a commit to fidalgo/rubocop-rails that referenced this issue Dec 6, 2019
Since these files are generated by Rails, Rucocop should not
report offenses on them.

Fixes rubocop#166
fidalgo added a commit to fidalgo/rubocop-rails that referenced this issue Dec 6, 2019
Since these files are generated by Rails, Rucocop should not
report offenses on them.

Fixes rubocop#166
fidalgo added a commit to fidalgo/rubocop-rails that referenced this issue Dec 11, 2019
Since these files are generated by Rails, Rucocop should not
report offenses on them.

Fixes rubocop#166
@koic koic closed this as completed in b1756fe Dec 18, 2019
koic added a commit that referenced this issue Dec 18, 2019
This issue was closed.
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

No branches or pull requests

3 participants