-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
It appears Layout/HashAlignment don't like anonymous arguments #11730
Closed
Labels
Comments
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
8 tasks
<deleted, posted meant to post here> |
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
marcandre
pushed a commit
to rubocop/rubocop-ast
that referenced
this issue
Mar 24, 2023
This PR adds `forwarded_kwrestarg` node to `AST::Builder`. This feature is required to resolve rubocop/rubocop#11730. I thought about defining a class like `ForwardedKwrestargNode` for `forwarded_kwrestarg`, but the node is actually an anonymous `KeywordSplatNode` so it's used.
koic
added a commit
to koic/rubocop
that referenced
this issue
Mar 25, 2023
Fixes rubocop#11730. This PR fixes an error for `Layout/HashAlignment` when using anonymous keyword rest arguments.
koic
added a commit
that referenced
this issue
Mar 25, 2023
…nment [Fix #11730] Fix an error for `Layout/HashAlignment`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Anonymous arguments:
https://rubyreferences.github.io/rubychanges/3.2.html#anonymous-arguments-passing-improvements
Expected behavior
My code which looks like below caused a crash. And I didn't expect that. This is valid ruby so I rubocop should accept it too.
Actual behavior
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:I cloned the this project to write a test for you. but I'm not sure I have added it to the correct place. And my code works fine when I remove
**
from the hash arg but my test still rails. I think this has to do ruby that this is a new ruby feature but I don't know.For next time: Is it good too include a failing spec like this in the issue?
The text was updated successfully, but these errors were encountered: