-
Notifications
You must be signed in to change notification settings - Fork 280
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
Fix Module with initialize method #1746
base: master
Are you sure you want to change the base?
Conversation
476f9ec
to
47c9730
Compare
1 small comment from my side, other than that, this looks great. Wdyt @mvz ? |
47c9730
to
4f95a44
Compare
@@ -21,14 +21,16 @@ def self.contexts # :nodoc: | |||
# @return [Array<SmellWarning>] | |||
# | |||
def sniff | |||
context.defined_instance_methods.each do |node| |
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.
Apparently, the cause of #1505 is that ModuleContext#defined_instance_methods
includes methods from dynamically defined nested classes. Instead of dropping down to bare sexp manipulation, I think this method should be adjusted instead.
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.
Do you have any clue where can I start?
Fixes #1505