We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
&.
Reading https://thoughtbot.com/blog/ruby-safe-navigation reminded me that over-use of &. is common. I think it would be helpful to add a guideline such as:
Avoid long chains of &.. Replace with . if they introduce unnecessary conditional logic. Consider other approaches such as delegation.
.
This could also be added as a rule in RuboCop with a maximum number of chained calls (e.g. 2 or 3).
The text was updated successfully, but these errors were encountered:
Yeah, I agree. We should definitely add some guidelines about &..
Sorry, something went wrong.
Created PR for it please review it #912
Fixed in #912
No branches or pull requests
Reading https://thoughtbot.com/blog/ruby-safe-navigation reminded me that over-use of
&.
is common. I think it would be helpful to add a guideline such as:This could also be added as a rule in RuboCop with a maximum number of chained calls (e.g. 2 or 3).
The text was updated successfully, but these errors were encountered: