-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Use struct for #audit_formula
args
#17651
Conversation
Not a fan of the name "args" as everything is an argument but otherwise don't have a strong opinion either way. |
I <3 this change, but agree that |
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 again @samford! Good to 🚢 once args
renamed!
Adding type signatures to `#audit_formula` methods in formula cops would lead to verbose, repetitive signatures across the existing ~63 instances. This reworks `#audit_formula` to use a `T::Struct` for its arguments, which allows us to use a one-line signature for these methods.
466ec29
to
17b0493
Compare
I updated this to use |
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.
Looks great, thanks again!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?As discussed in #17643 (comment), adding type signatures to
#audit_formula
methods in formula cops would lead to verbose, repetitive signatures across the existing ~63 instances:This reworks
#audit_formula
to use aT::Struct
for its arguments, which allows us to use a one-line signature for these methods. There may be room for improvement here but this seems to work as expected, at least.