What is a good way to find methods in a that are not being called anymore? I’m in the process of refactoring a large Rails application and the worst thing you can find is code that is not being used anymore.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a tricky problem without an easy, always-right answer. Some places to start include:
The biggest issue is that unused code and unreachable code aren’t the same things. Just because code isn’t exercised routinely in production doesn’t really mean it’s dead code that should be removed. It may be there for a reason—just not one that comes up often.