reek
reek copied to clipboard
FeatureEnvy and small methods
I'm really beginning to dislike the FeatureEnvy detector for small methods:
def common_parameters_equal?(other_parameters)
smell_warning.parameters.values_at(*other_parameters.keys) == other_parameters.values
end
Should we make this less strict? Require a larger difference? More statements? WDYT?
I would be perfectly fine with making it less strict. Maybe everything less than 3 statements is fine?
I just came here to suggest giving a tolerance option—e.g. tolerance of 1
would allow 1 more reference to another "envious receiver" than to self
. Could default to 0
for current hard-coded behavior.