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

disable InverseOf cop #54

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

Cohen-Carlisle
Copy link
Contributor

see #51 and #52 for some details about why this cop can be problematic.
TLDR: it currently flags associations with scopes even though Rails 7+ handles them automatically. it also flags the less problematic side of has_many associations and fails to stop N+1 queries via its suggested fix.

supercedes #52

I made this PR because I feel like until the cop is suggesting more helpful fixes, it should be disabled.

see standardrb#51
and standardrb#52
for some details about why this cop can be problematic.
TLDR: it currently flags associations with scopes even though
Rails 7+ handles them automatically. it also flags the less
problematic side of has_many associations and fails to stop
N+1 queries via its suggested fix.
@searls searls merged commit e0c3256 into standardrb:main Jul 26, 2024
4 checks passed
@Cohen-Carlisle Cohen-Carlisle deleted the disable-inverse-of-cop branch July 26, 2024 15:01
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.

2 participants