You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found all of the following usages in a form or another in real code.
# encoding: utf-8# test_trivial_methods.rb# Auto-correction failing in this class.classMyTrivialMethodsdefone_value@another_valueenddefgood?@goodenddefvalue(value)@value=valueenddefstore_my_block(&block)@block=blockendend
Then...
$ bin/rubocop --auto-correct -f s test_trivial_methods.rb
== test_trivial_methods.rb ==
C: 5: 3: [Corrected] Use attr_reader to define trivial reader methods.
C: 9: 3: [Corrected] Use attr_reader to define trivial reader methods.
C: 13: 3: [Corrected] Use attr_writer to define trivial writer methods.
C: 17: 3: [Corrected] Use attr_writer to define trivial writer methods.
1 file inspected, 4 offenses detected, 4 offenses corrected
...but nothing is actually changed. What do you think should be the correct behavior here? Spontaneously, I find at least methods 2-4 useful in some contexts, and while number 1 doesn't feel like a good idea, there might be reasons to do that, too.
The text was updated successfully, but these errors were encountered:
I've found all of the following usages in a form or another in real code.
Then...
...but nothing is actually changed. What do you think should be the correct behavior here? Spontaneously, I find at least methods 2-4 useful in some contexts, and while number 1 doesn't feel like a good idea, there might be reasons to do that, too.
The text was updated successfully, but these errors were encountered: