-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
New Cop idea: detect redundant all
#1016
Comments
masato-bkn
changed the title
New Cop idea:
New Cop idea: detect redundant Jun 10, 2023
Rails/RedundantAll
all
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Jun 17, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Jun 17, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Jun 17, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Jun 17, 2023
9 tasks
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Jun 18, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 11, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 11, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 11, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 27, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 27, 2023
masato-bkn
added a commit
to masato-bkn/rubocop-rails
that referenced
this issue
Aug 27, 2023
koic
added a commit
that referenced
this issue
Aug 28, 2023
[Fix #1016] Add `Rails/RedundantActiveRecordAllMethod` cop
The release notes list this as bug fix but it should have been a new feature, right? |
koic
added a commit
that referenced
this issue
Sep 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I often come across
all
used as receiver for Active Record query methodsHowever, in these cases, the output is the same with or without
all
, so I think it's redundant and could be removed.Describe the solution you'd like
I'd like to add a cop that remove
all
used as receiver of Active Record query methods.Example
Query methods to be checked
I am considering one of the following options for methods to be checked by this cop.
find
,find_by
,order
,where
, etcAdditional context
If there's a positive reaction to this cop idea, I plan to submit a PR.
The text was updated successfully, but these errors were encountered: