Code audit

  • Thread starter Thread starter Leon
  • Start date Start date
L

Leon

Hello,

I am currently working on a project with the following layout:
10 applications, each making calls to a common custom framework built on top
of .Net. Each app consists of a solution with a number of projects
underneath. The framework is referenced by each application through a
project reference, but each app may use different methods inside the
framework (ex. some apps use Transactions, others don't). I need -to perform
an audit on the applications to figure out which methods in the framework are
actually used, but I can't seem to come up with an effective way of doing it.
Since the framwork is referenced in 10 separate solutions, I would like to
avoid having to open each one individually and than finding all the
references for each of the framework methods. Does any one know of a good
tool to do this or can recommend an approach?

Thank you very much,
Leon
 
Hi Patrice,

The overall goal is to performa a statistical analysis on the codebase: how
many calls are made to a given method and by which applications. While
marking methods as obsolete would be a great approach going forward, it
doesn't solve my immediate need to figure out what methods are being called
(I wouldn't know which are actually obsolete).

Regards,
Leon
 
Thanks so much, I'll take a look

Regards,
Leon

Patrice said:
Assuming a static analysis. Perhaps FXCop (try
http://www.binarycoder.net/fxcop/html/callers_and_callees.html). Try also
http://stackoverflow.com/questions/...p-rule-that-will-detect-unused-public-methods.
It poins aslo to another product that could worth to evaluate...

I assume that the "number of calls" is the number of times a particular
method appears elsewhere in the source code (not how many times it is
actually called when the application is running ?)
 
There are static code analysis tools that will walk your code and give you
metrics. If you are willing to put everything in one solution, you can use
toolls like Resharper to show you the dead methods in the framework. There
are also third party dependency checkers out there.

In your situtation, you may be able to automate, but you will be running
analysis on all 10 projects.

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
 
Back
Top