-
Notifications
You must be signed in to change notification settings - Fork 213
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
Style/ArgumentsForwarding seems a bit heavy-handed #612
Comments
It is worth mentioning that Sorbet currently doesn't allow arguments forwarding, including for block arguments. I'm glad to have found this workaround by using a different block argument name. IMO the rule seems to cause more trouble than it is worth.
|
Yeah, I have come to personally dislike being forced into this one, and I noticed as well that when I went back to maintain mocktail I had to add a bunch of #ignore directives. Personally, I think Standard should be compatible with Sorbet codebases and we should disable this one at least until it is. @camilopayan what do you think? |
Agreed I just upgraded This original code: def method_missing(meth, *args, **opts, &blk)
if delegated_class_method?(meth)
opts[:account_id] = @account.id if @account
opts[:env] = @env.merge(opts[:env] || {})
opts[:session] = @session.merge(opts[:session] || {})
@auth_class.send(meth, *args, **opts, &blk)
elsif delegated_instance_method?(meth)
internal { send(meth, *args, **opts, &blk) }
else
super
end
end Was re-written into: def method_missing(meth, *, **opts, &)
if delegated_class_method?(meth)
opts[:account_id] = @account.id if @account
opts[:env] = @env.merge(opts[:env] || {})
opts[:session] = @session.merge(opts[:session] || {})
@auth_class.send(meth, *, **opts, &)
elsif delegated_instance_method?(meth)
internal { send(meth, *args, **opts, &blk) }
else
super
end
end This breaks, because there is still a reference to I believe this is rubocop/rubocop#12875, which is fixed in newer versions. Leaving this here just as a breadcrumb to others in similar position. I haven't been able to upgrade For now, I'm going to avoid this |
Ok if @bjeanes is on board then I think I'd support a merge if someone sends a PR to disable it. |
Just updated standard to 1.34.0 and saw this failure:
Which auto-fixes to this:
I was kinda annoyed by this, and maybe even more annoyed when I realized that only
[blk, block, proc]
trip the rule.Am I just being an old crank because I have 20 years of muscle memory writing
&blk
?The text was updated successfully, but these errors were encountered: