We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There should be a way to configure different visibility levels for macros to avoid false positives with the ordering of protected/private macros.
Currently, there is no way to make such configuration.
Given the following configuration:
Layout/ClassStructure: Categories: - attribute: - attr_accessor - attr_writer - attr_reader ExpectedOrder: - attribute - initializer
And the following class definition:
class Person attr_accessor :name def initialize(name) @name = name end private attr_accessor :age end
Rubocop gives the following output:
person.rb:10:3: C: Layout/ClassStructure: attribute is supposed to appear before initializer. attr_accessor :age ^^^^^^^^^^^^^^^^^^
$ rubocop -V 0.52.1 (using Parser 2.4.0.2, running on ruby 2.3.0 x86_64-darwin16)
The text was updated successfully, but these errors were encountered:
[Fix #5465] Fix Layout/ClassStructure to allow grouping macros by the…
2133a5f
…ir visibility (#5468)
Successfully merging a pull request may close this issue.
Expected behavior
There should be a way to configure different visibility levels for macros to avoid false positives with the ordering of protected/private macros.
Actual behavior
Currently, there is no way to make such configuration.
Steps to reproduce the problem
Given the following configuration:
And the following class definition:
Rubocop gives the following output:
RuboCop version
The text was updated successfully, but these errors were encountered: