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

Add a Money/UnsafeToMoney cop #264

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Add a Money/UnsafeToMoney cop #264

merged 3 commits into from
Jun 20, 2023

Conversation

lavoiesl
Copy link
Contributor

@lavoiesl lavoiesl commented Jun 20, 2023

Prevents a potentially dangerous use of the Fuzzy parser.

See comment for detail and #250 (comment) for context

Copy link

@AndreiUngur AndreiUngur left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Seems like there are no "code-owners" defined? But I think this change should be harmless given that it's adding an optional cop. Should also be safe to revert if anything;

I wonder if we should link this comment in the code as a justification for the cop? I really don't feel strongly : #250 (comment)

cc @elfassy

@elfassy
Copy link
Contributor

elfassy commented Jun 20, 2023

Thanks for this PR! ❤️
Eventually when no one is using .to_money we can deprecate that method completely

Copy link
Contributor

@bslobodin bslobodin left a comment

Choose a reason for hiding this comment

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

I would also suggest including the new cop in the README,

https://github.com/Shopify/money#rubocop

@lavoiesl lavoiesl merged commit 9b1c256 into master Jun 20, 2023
@lavoiesl lavoiesl deleted the seb-unsafe_to_money-cop branch June 20, 2023 18:06
@lavoiesl lavoiesl mentioned this pull request Jun 20, 2023
@shopify-shipit shopify-shipit bot temporarily deployed to production June 20, 2023 18:18 Inactive
@elfassy
Copy link
Contributor

elfassy commented Jun 20, 2023

PR to deprecated the legacy behaviour for new apps #267

@shopify-shipit shopify-shipit bot temporarily deployed to production June 21, 2023 20:43 Inactive
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.

4 participants