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
False positive for Layout/IndentationConsistency
with EnforcedStyle: indented_internal_methods
#8919
Labels
Comments
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Oct 22, 2020
This PR supports struct constructor for `SendNode#macro?`. Like class constructor, struct constructor will be recognized as a macro and will be awakened in the following `private` modifier: ```ruby Foo = Struct.new(:foo) do private def private_foo foo end end ``` With this change, this PR aims to resolve the following issue. rubocop/rubocop#8919
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Oct 22, 2020
This PR makes `SendNode#macro?` aware of struct constructor. Like class constructor, struct constructor will be recognized as a macro and will be awakened in the following `private` modifier: ```ruby Foo = Struct.new(:foo) do private def private_foo foo end end ``` With this change, this PR aims to resolve the following issue. rubocop/rubocop#8919
koic
added a commit
to koic/rubocop-ast
that referenced
this issue
Oct 23, 2020
This PR makes `SendNode#macro?` and `RuboCop::AST::Node#class_constructor?` aware of struct constructor and `RuboCop::AST::Node#struct_constructor?` is deprecated. Like class constructor, struct constructor will be recognized as a macro and will be awakened in the following `private` modifier: ```ruby Foo = Struct.new(:foo) do private def private_foo foo end end ``` With this change, this PR aims to resolve the following issue. rubocop/rubocop#8919
marcandre
pushed a commit
to rubocop/rubocop-ast
that referenced
this issue
Oct 23, 2020
This PR makes `SendNode#macro?` and `RuboCop::AST::Node#class_constructor?` aware of struct constructor and `RuboCop::AST::Node#struct_constructor?` is deprecated. Like class constructor, struct constructor will be recognized as a macro and will be awakened in the following `private` modifier: ```ruby Foo = Struct.new(:foo) do private def private_foo foo end end ``` With this change, this PR aims to resolve the following issue. rubocop/rubocop#8919
koic
added a commit
to koic/rubocop
that referenced
this issue
Oct 23, 2020
Fixes rubocop#8919 and follow rubocop/rubocop-ast#141. This PR requires rubocop-ast 1.0.1 to awaken of struct constructor. And it will also add a reproduction test for rubocop#8919
8 tasks
@kamipo This issue has been resolved by rubocop/rubocop-ast#141 and RuboCop AST 1.0.1 has been released. Can you update rubocop-ast to 1.0.1? Thank you. |
Thank you for the quick fix! I've confirmed that is fixed in rails/rails#40436. |
koic
added a commit
that referenced
this issue
Oct 23, 2020
[Fix #8919] Require RuboCop AST to 1.0.1 or higher
koic
added a commit
to koic/rubocop-rails_config
that referenced
this issue
Oct 25, 2020
Follow rails/rails#40436. This PR enables `Layout/SpaceAroundOperators` cop. rails/rails#40436 setting requires RuboCop 1.0 and RuboCop AST 1.0.1 or higher. rubocop/rubocop#8919 Therefore this PR will be dropping versions that is lack for that requires.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like there is a regression for
Layout/IndentationConsistency
withEnforcedStyle: indented_internal_methods
against Struct block in RuboCop 1.0.0.Steps to reproduce the problem
Expected behavior
No offences.
Actual behavior
RuboCop version
1.0.0 (using Parser 2.7.2.0, rubocop-ast 0.8.0, running on ruby 2.7.1 x86_64-darwin17)
The text was updated successfully, but these errors were encountered: