0

When your application is getting bigger, it is difficult to know what parts are being used for the current use cases. It is likely there are pieces of code, needed at the beginning, no required anymore. These parts of the software are still working fine, tested with the corresponding unit tests, but not actually needed.

What is the best way to handle this scenario? Is there any standard way to detect this code to mark it as deprecated and remove it in next releases?

EDITED: I mostly work with Javascript in the backend side

Andrés
  • 719
  • 1
  • 4
  • 21
  • 2
    not sure, but I think using [Sonar](https://blog.sonarsource.com/detect-dead-code-and-calls-to-deprecated-methods-with-sonar-squid) is possible. – Danila Ganchar Feb 16 '18 at 13:42
  • 1
    That highly depends on the language used. If it can be analysed statically, an appropriate tool can tell you what is and isn't being used. The more dynamic the language is the more difficult that gets. – deceze Feb 16 '18 at 13:43
  • @deceze that's my point, I usually work with Javascript – Andrés Feb 16 '18 at 13:45
  • ReSharper by Jetbrains should do the trick: https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_JAVA_SCRIPT.html – Cool Breeze Jun 20 '18 at 10:58

0 Answers0