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/BisectedAttrAccessor doesn't respect public/private #8259
Labels
Comments
Dup with #8253. |
Ah, the above comment is my mistaken. this is a different cop that is similar to |
Also just run into it when upgraded rubocop version. Basic example:
|
@koic could you reopen it? |
Will look into this. |
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.
Often times I only want to make the
attr_reader
public, but still define theattr_writer
privately for internal use. However, with this cop enabled (especially with autocorrect turned on) this totally changes the access rules and therefore the API of the class.Describe the solution you'd like
I have no idea how easy this would be to implement, but it would be great if the cop could only "fire" (is that the correct term?) if the reader and writer have the same access level, i.e. both public, private, or protected.
The text was updated successfully, but these errors were encountered: