-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update one letter variables to be more descriptive #3400
Conversation
core/spec/models/spree/return_item/exchange_variant_eligibility/same_product_spec.rb
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I hesitate to merge this because this touches so many files and will most likely make lots of open PRs unmergeable w/o a rebase. But still, great work 👏
@kennyadsl rebased. As for the git conflict concerns they're certainly true, but I'm also not really sure how to accomplish this change without essentially tearing the band aid off and dealing with the pain. The only other way to handle it would be to leave the code as is until the code is touched as part of another PR and not merging them without fixing any 1 letter variables they touch. I could help fix PRs with conflicts if they turn up though. I suspect there will be fewer of them than feared, but I'm not really sure. |
Throughout Solidus' codebase there are many one-letter variables. These are not ideal as they are not expressive and meaningful for human beings.
We want to name rescued errors as error not simply e in order to clear up one-letter variables that are not communicative.
This makes code easier to read using if rather than unless conditional.
It's okay to skip model validation to setup a spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @JDutil!
The variable has been missed in solidusio#3400
The variable has been missed in solidusio#3400
The variable has been missed in #3400
The variable has been missed in solidusio#3400
Throughout Solidus' codebase there are many one-letter variables.
These are not ideal as they are not expressive and meaningful for human
beings.
This is a continuation of work done by @mkoltonski in #3304 with the feedback from @dportalesr incorporated.
Fixes #3294
Checklist: