reek icon indicating copy to clipboard operation
reek copied to clipboard

FeatureEnvy and small methods

Open mvz opened this issue 4 years ago • 2 comments

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?

mvz avatar Apr 20 '20 05:04 mvz

I would be perfectly fine with making it less strict. Maybe everything less than 3 statements is fine?

troessner avatar Apr 20 '20 16:04 troessner

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.

replaid avatar Dec 18 '20 08:12 replaid