-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp-wantedExtra attention is neededExtra attention is needed
Description
Describe the bug
In this example, the method type_updated?
will be flagged as unused, despite being called as a proc.
after_update :notify, if: :type_updated?
def type_updated?
# contents irrelevant
end
def notify
# this is a placeholder to demonstrate the issue.
end
The commonness of this pattern means that deadcode
results can be flooded with these examples.
To Reproduce
Spoom v1.6.1
See above code snippet, add it to to any Rails model
Run bundle exec spoom deadcode
Expected behavior
Symbolic references to a method mean that it will be considered used.
For deadcode output, this change would mean the method will be
- Excluded (works fine for my purposes), or
- Moved to a separate report section, or
- Configurable as to whether or not it appears in the report (and excluded by default)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp-wantedExtra attention is neededExtra attention is needed