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
TrivialAccessors breaks methods with ? #2763
Comments
I just tried this out, and can confirm it only happens with class methods. The following is marked as an offense, but not auto-corrected:
|
@Drenmi why is that an offense? |
@ptarjan: The style guide favours the use of An example of a working way would be:
|
I thought |
Just configure (Maintainers, what would you think about making This issue can be closed. |
Thanks @alexdowad. Where is that option documented? Can you add a little blurb to https://github.com/bbatsov/rubocop/blob/master/config/default.yml |
RuboCop is, for the most part, not documented. It's a WIP, and a lot of help is needed to finish it. |
@alexdowad This is similarly broken for writers that don't match the exact pattern.
Can't be written with |
Let's close this issue. It is resolved using an existing config option. |
@alexdowad what existing config option? If I set |
The cop wants you to write methods like this using a The original issue here was: "TrivialAccessors breaks methods with ?". That issue is resolved using |
$ rubocop /tmp/a.rb -a
gives
which is invalid:
The text was updated successfully, but these errors were encountered: