Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureEnvy and small methods #1535

Open
mvz opened this issue Apr 20, 2020 · 2 comments · May be fixed by #1744
Open

FeatureEnvy and small methods #1535

mvz opened this issue Apr 20, 2020 · 2 comments · May be fixed by #1744
Assignees

Comments

@mvz
Copy link
Collaborator

mvz commented Apr 20, 2020

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?

@troessner
Copy link
Owner

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

@replaid
Copy link

replaid commented Dec 18, 2020

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.

@mvz mvz self-assigned this Dec 18, 2020
JuanVqz added a commit to JuanVqz/reek that referenced this issue Oct 16, 2023
This is adding a configuration `max_calls` key for the FeatureEnvy smell detector

Fixes troessner#1535
@JuanVqz JuanVqz linked a pull request Oct 16, 2023 that will close this issue
JuanVqz added a commit to JuanVqz/reek that referenced this issue Oct 16, 2023
This is adding a configuration `max_calls` key for the FeatureEnvy smell detector

Fixes troessner#1535
JuanVqz added a commit to JuanVqz/reek that referenced this issue Oct 19, 2023
This is adding a configuration `max_calls` key for the FeatureEnvy smell detector

Fixes troessner#1535
JuanVqz added a commit to JuanVqz/reek that referenced this issue Oct 23, 2023
This is adding a configuration `max_calls` key for the FeatureEnvy smell detector

Fixes troessner#1535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants