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

Consider eager loaded code too when detecting dead methods #565

Merged

Conversation

fatkodima
Copy link
Contributor

Currently, if the file was loaded during eager loading and then its code is never executed during runtime, then it will not have any runtime coverage and when printing dead methods, this file will be missed.

When reporting dead methods, we need to look at all the files discovered during the eager loading and runtime phases.

Copy link
Owner

@danmayer danmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find, I haven't worked with the dead code auto detection part of the project for awhile. If you are using it and find it useful let me know. I used to have some scripts to turn detected dead code into PRs, but it sometimes found false positives... generally admin or seasonal code that was just rarely used.

@danmayer danmayer merged commit b31f5c0 into danmayer:main Oct 25, 2024
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants