views:

118

answers:

2

The APIs that might be of interest to developers of Java applications that need to perform source code analysis are the Java Compiler API (JSR 199), the Pluggable Annotation Processing API (JSR 269), and the Compiler Tree API.

Any similar api or library for .net?

+1  A: 

Visual Studio 2008 comes with a tool that run source code analysis: it gives you the code inheritance depth, lines of code (compiled), mainteinability indexes for your solution/project/clases/methods.

Im not sure if there is a plugin for VS2003-2005 with this functionality.

For the comments of the methods/clases, VS 2008, doesn't have a native tool, however, for VS 2003-2005 there is an open project on sourceforge, that take the comments (''' comments) above the member (namespace, class, method, property) header(which is stored on the classes .xml files) and generetes documentation like JavaDoc. For VS 2008, I have developed a tool that does the same, that I can share if you need.

Mg
A: 

For code analysis, I've been using the free tool from Microsoft is called FxCop for years.

Jonathan Allen