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

Ignore more directories #796

Closed
yenshirak opened this issue Sep 27, 2022 · 1 comment · Fixed by #797
Closed

Ignore more directories #796

yenshirak opened this issue Sep 27, 2022 · 1 comment · Fixed by #797
Labels
enhancement New feature or request

Comments

@yenshirak
Copy link

Is your feature request related to a problem? Please describe.

Currently some directories that shouldn't contain any Ruby files aren't ignored by default:

  • log
  • public
  • storage

These may contain a large number of subdirectories and files (especially storage) which can drastically slow down RuboCop.

Describe the solution you'd like

I think we should ignore these directories by default because it's time consuming to understand what's causing the slowdown.

Describe alternatives you've considered

Alternatively a warning message should be displayed when RuboCop scans more than X non Ruby files in a directory.

Additional context

I can work on a PR.

@koic koic added the enhancement New feature or request label Sep 29, 2022
koic added a commit to koic/rubocop-rails that referenced this issue Sep 29, 2022
This PR adds several directories to `Exclude` to prevent slow investigation.
These directories (`log`, `public`, and `storage`) provided by `bin/rails`
are expected not to contain Ruby code. And `tmp` and `vendor` directories
have already been excluded in the RuboCop core.
koic added a commit to koic/rubocop-rails that referenced this issue Sep 29, 2022
Fixes rubocop#796.

This PR adds several directories to `Exclude` to prevent slow investigation.
These directories (`log`, `public`, and `storage`) provided by `bin/rails`
are expected not to contain Ruby code. And `tmp` and `vendor` directories
have already been excluded in the RuboCop core.
@koic
Copy link
Member

koic commented Sep 29, 2022

That makes sense. I've opened #797.

koic added a commit to koic/rubocop-rails that referenced this issue Sep 29, 2022
Fixes rubocop#796.

This PR adds several directories to `Exclude` to prevent slow investigation.
These directories (`log`, `public`, and `storage`) provided by `bin/rails`
are expected not to contain Ruby code. And `tmp` and `vendor` directories
have already been excluded in the RuboCop core.
https://github.com/rubocop/rubocop/blob/v1.36.0/config/default.yml#L65-L66
@koic koic closed this as completed in #797 Oct 9, 2022
koic added a commit that referenced this issue Oct 9, 2022
…nt_slow_investigation

[Fix #796] Add several directories to `Exclude`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants