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

Fix Rubocop Style/GuardClause Violations #6093

Merged

Conversation

chrisnicollo
Copy link
Contributor

@chrisnicollo chrisnicollo commented Jan 5, 2025

As stated in issue #5297, there are currently too many global exemptions to rubocop rules. One of them is Style/GuardClause.

In this PR, I removed that exemption and replaced violations with guard clauses where necessary.

@ragesoss
Copy link
Member

ragesoss commented Jan 6, 2025

These look like nice style improvements to me.

In principle I don't like adding exceptions just for the sake of avoiding the violation of another rule, and I think there might be some refactoring that could make that code a little more readable and satisfy both rules together. But that might be more trouble than it's worth, and I'm fine with leaving the inline exceptions in place at this point.

@chrisnicollo chrisnicollo marked this pull request as draft January 6, 2025 21:59
@chrisnicollo chrisnicollo marked this pull request as ready for review January 7, 2025 21:09
@ragesoss ragesoss merged commit d003c31 into WikiEducationFoundation:master Jan 8, 2025
1 check passed
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