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
Allow Rails attribute in EmptyLinesAroundAttributeAccessor #7981
Comments
8 tasks
Yes I know, that RuboCop is Ruby specific and the |
koic
added a commit
to koic/rubocop
that referenced
this issue
May 17, 2020
…ributeAccessor` Fixes rubocop#7976 and rubocop#7981 This PR adds `AllowAliasSyntax` and `AllowedMethods` options. for `Layout/EmptyLinesAroundAttributeAccessor` cop. Users can configure a behavior for `alias` syntax using `IgnoreAliasSyntax` option. Ignored by default (true). And users can specify ignored methods using `AllowedMethods`. By default, set `alias_method`, `public`, `protected`, and `private` provided by Ruby. `cattr_accessor`, `attribute`, other methods provided by Rails (and other gems) can be set by user applications or RuboCop Rails gem.
bbatsov
pushed a commit
that referenced
this issue
May 17, 2020
…ccessor` Fixes #7976 and #7981 This PR adds `AllowAliasSyntax` and `AllowedMethods` options. for `Layout/EmptyLinesAroundAttributeAccessor` cop. Users can configure a behavior for `alias` syntax using `IgnoreAliasSyntax` option. Ignored by default (true). And users can specify ignored methods using `AllowedMethods`. By default, set `alias_method`, `public`, `protected`, and `private` provided by Ruby. `cattr_accessor`, `attribute`, other methods provided by Rails (and other gems) can be set by user applications or RuboCop Rails gem.
#7981 has been merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I prefer to group all attributes together including ActiveModel::Attributes#attributes
Describe the solution you'd like
I would expect that
EmptyLinesAroundAttributeAccessor
allow to groupattribute
with other accessorsAdditional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: