I work with a code base that has been in place for 10 years. The code has undergone numerous additions, changes, releases and refactoring without removing any code or modules that are no longer required. As a result, the code base is littered with unnecessary code.
Ask one of you to come up with a comprehensive technique or product to test your code base to find redundant unused code.
Assuming one way could be to run a full suite of tests and use the code coverage tool to find out which code is not executing.
PHP, http://www.google.ca/search?hl=en&q=php+code+coverage+tools 300 000 , PHP
, , , , , . , .
, , . , , .
, . get_declared_classes(), , , .
, , . , .
: http://nz.php.net/oop5.reflection
, : http://en.wikipedia.org/wiki/Connectivity_(graph_theory)
, /, . - Project Analyzer Visual Basic, . , .
, , - , . , , . UML/ , .
.
, , , - if- (), , .
, . , , , , , - , .
, , .
edit: , PHP. XDebug ( php), WinCachegrind (KCacheGrind , linux), , - XDebug.
For Java code, Bill Pugh, father of Findbugs, presented some interesting ideas for finding dead code using lightweight tools (and, of course, great ideas for static analysis) in a recent presentation on JavaOne
Source: https://habr.com/ru/post/1708536/More articles:ASP.NET Forms autosave - javascriptASP.Net VS ASP.Net MVC - syntaxSafe injection call in IAxaptaRecord.ExecuteStmt () - axaptaudocumented apis for iphone that passed - apiЕсть ли способ обнаружить изменение DOM-w630 в Javascript? - javascripthow to send and then read \ n using SocketChannel in Java - javaHow to load a DLL from a directory using the MEF (Managed Extensibility Framework) - c #Web client class inheritance - inheritanceSetting the default CPU to true in Java VisualVM - javaHow to change source files in Pre-Build ... without changing source files? - c ++All Articles