-
Notifications
You must be signed in to change notification settings - Fork 0
Tweaks for the PR to r-lib/styler#463 #1
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
Tweaks for the PR to r-lib/styler#463 #1
Conversation
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.
@lorenzwalthert, Thanks for the review, I am fine with your proposed simplifications.
See below for two more specific comments.
320ca36
to
418dea5
Compare
418dea5
to
d2a87ef
Compare
Co-Authored-By: lorenzwalthert <[email protected]>
Co-Authored-By: lorenzwalthert <[email protected]>
@riccardoporreca thanks for your second review pass, I was not really careful with these suggestions 😞 |
@lorenzwalthert, no worries |
I reviewed your r-lib/styler#463 and figured I'd need to test things myself so I ended up changing the code quite a bit myself and found it would be easier to propose this change to your repo, so once this is merged, we can merge r-lib/styler#463. If you agree. I started with the following observation: The regex match for package namespace and namespace object (i.e.
match_fun()
) can be replaced witheval(parse(...))
statement while retaining the property of matching bothpkg::fun
andfun
notation. Then, I removed the Addins setters and getters because they are both oneliners and wrapping them inside another function call adds more cognitive overhead (for me at least) than it hides abstraction. Finally, I added some documentation and removed the package styler Addin. Sorry I did not commit the latter separately but it's convoluted in 3d57c3e, so you may want manually add this to your fork in case you want to keep it. What do you think?