-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
Hi!
Is your feature request related to a problem? Please describe.
We have a method named get_min!. It has a bang because it's not just an accessor: it has side-effects (and does return a result).
I think that Naming/AccessorMethodName should not fire in this case (names ending with a bang).
We also have other get_foo methods, where we use get_ as a hint that they are costly. They are not just as cheap as accessors. It would be nice if Naming/AccessorMethodName had some AllowedMethods or AllowedNames support for such cases.
Describe alternatives you've considered
Of course we can use # rubocop:disable, but:
- for
get_min!, it does not look like a genuine accessor, IMHO it should not fire at all - for other the cases, it's just nicer to avoid cluttering the source with magic comments, but it's also less precise (it is project-wise), so I can see reason to reject this.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels