-
Notifications
You must be signed in to change notification settings - Fork 4
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
[reek] change config to ignore some pain points #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,8 +55,9 @@ detectors: | |
ManualDispatch: | ||
enabled: true | ||
exclude: [] | ||
# Not really useful and ignored a lot. | ||
MissingSafeMethod: | ||
enabled: true | ||
enabled: false | ||
exclude: [] | ||
ModuleInitialize: | ||
enabled: true | ||
|
@@ -143,4 +144,4 @@ detectors: | |
UtilityFunction: | ||
enabled: true | ||
exclude: [] | ||
public_methods_only: false | ||
public_methods_only: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no change here. Do you want to change to UtilityFunction shows that there is a mix of responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, this one is not working properly. e.g Using a map on an instance variable and then using a method inside will trigger this cop. There is an issue open for a while on reek repository for that but currently this is a major bug IMO (check alice link above). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bang means that the method is the dangerous version and that a safe version exist.
bang mean that there is a preferable and less dangerous version of the method.
Instead of remove this metric, just stop to use bang.
concat
is a good example in ruby. It modify the receiver likemap!
or other methods with bang.It is name
concat
and notconcat!
. There is not link between the modification of the receiver and the bang.https://www.rubydoc.info/github/troessner/reek/Reek/Smells/PrimaDonnaMethod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know but this is not followed at all in our codebase. It currently makes noise everywhere.