I've started working on a collection of code analysis tools, that are open source and available for anyone to use. I've got a descriptive article located at CodeProject.com (http://www.codeproject.com/cs/algorithms/Not_Used_Analysis.asp), which includes the source code and binaries.
The three main tools that I have so far are the following:
- A “Not Used Finder”: searches through a list of assemblies and looks for any type, method or field that isnt ever used. Points out code that you should be able to remove.
- A visibility analysis: searches through a list of assemblies and looks at the visibility of methods and types and shows those that have a visibility higher than is required based on current usage.
- A Duplicate / Near Duplicate code analysis