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
Style/ModuleFunction supports two styles, module_function (default) and extend_self. I would like an additional style, which prohibits both, i would suggest calling this none.
Describe alternatives you've considered
We could write a custom cop instead, but it seems more natural to fold it into Style/ModuleFunction.
Additional context
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
Is your feature request related to a problem? Please describe.
We have found both
extend self
andmodule_function
to be problematic for various reasons:module_function
withinUtil
. Callers often arbitrarily pick one, for instanceAlignment
chose the instance method invocationbegins_its_line?
:https://github.com/rubocop-hq/rubocop/blob/87ce6e05e7583820ad66cbcb4d84615ed108fba2/lib/rubocop/cop/mixin/alignment.rb#L51
while
HashAlignment
used the class method invocationUtil.begins_its_line?
:https://github.com/rubocop-hq/rubocop/blob/87ce6e05e7583820ad66cbcb4d84615ed108fba2/lib/rubocop/cop/mixin/hash_alignment.rb#L21
Describe the solution you'd like
Style/ModuleFunction
supports two styles,module_function
(default) andextend_self
. I would like an additional style, which prohibits both, i would suggest calling thisnone
.Describe alternatives you've considered
We could write a custom cop instead, but it seems more natural to fold it into
Style/ModuleFunction
.Additional context
The text was updated successfully, but these errors were encountered: