문제

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.

도움이 되었습니까?

해결책

This is a tricky problem without an easy, always-right answer. Some places to start include:

  1. Sweep unused code into the dustbin with rcov
  2. Performance Testing Ruby on Rails Applications
  3. Find unused code in a Rails app

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top