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

Update one letter variables to be more descriptive #3400

Merged
merged 8 commits into from
Oct 28, 2019

Conversation

JDutil
Copy link
Contributor

@JDutil JDutil commented Oct 24, 2019

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:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

Copy link
Member

@tvdeyen tvdeyen left a 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 👏

@tvdeyen tvdeyen mentioned this pull request Oct 25, 2019
4 tasks
@kennyadsl
Copy link
Member

@JDutil I've merged #3399 so we can rebase now.

I'm also a little bit concerned with what Thomas said. Not sure how we could reduce the pain though. Splitting this PR into multiple ones was my first thought but I don't think it helps since we'd still have the same conflicts. Any other idea?

@JDutil
Copy link
Contributor Author

JDutil commented Oct 26, 2019

@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.

MarcinMartin and others added 8 commits October 26, 2019 12:22
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.
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @JDutil!

@kennyadsl kennyadsl merged commit e3be38d into solidusio:master Oct 28, 2019
@JDutil JDutil deleted the fixes-3294 branch October 28, 2019 16:05
kennyadsl added a commit to nebulab/solidus that referenced this pull request May 11, 2020
kennyadsl added a commit to nebulab/solidus that referenced this pull request May 11, 2020
kennyadsl added a commit that referenced this pull request May 13, 2020
mamhoff pushed a commit to mamhoff/solidus that referenced this pull request Feb 1, 2021
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.

Rename one letter variables
5 participants