About

I am a software developer in Seattle, building a new AI software company.

Ads

August 2009

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Ads


« Orcas and Open Specs | Main | Joel Test »

November 20, 2005

Comments

David M. Kean

You state that there aren't any good static analysis tools for .NET, yet you obviously have not checked FxCop if you think that it's a 'style' checker; FxCop doesn't even check source.

It is also the static code analysis that is available in Team System.

Chris Nahr

You can do style checking in .NET without reading the source code since IL contains full metadata.

The emphasis of FxCop is on enforcing Framework design guidelines -- that's what it was designed for. Hence, it mainly checks stuff like casing rules, identifier suffixes, presence and naming of recommended methods, etc. That's definitely what I'd call style checking.

FxCop also does some more advanced stuff like detecting unused variables and methods, but nothing like the really in-depth code analysis that Wesner is outlining for his tool.

David M. Kean

If that's what Wesner meant by style then that is but a small portion of FxCop; there is security, performance and correct usage analysis as well, on top of that it is also extensible.

Wesner Moise

FXCop rules tend to be based on metadata rather than code (IL).

Because of this, I referred to the current version as a style checker. There are a few instances of IL-based rules.

FXCop has the capacity to do more, but is currently underutilized; that might change in the next iteration of FXCop rules. As I have only used the free version, it's quite possible that the Team System edition may already have more IL-based rules.

There is also some information lost in the translation from languages to IL--high-level language constructs, variables names, XML summaries and comments.

Chris Bilson

About 6 months ago, I had an idea to use FxCop with DxCore (devexpress, Code Rush) with FxCop to make a plugin that did static anlaysis in the background while you were working in Visual Studio (I wanted to call it Fx-DriveBy.) Unfortunately, FxCop is difficult to use like that because of a bunch of CAS nonsense, plus the introspection engine (?...or some other component, can't remember now) is not licensed for use outside of FxCop, so I gave up on the idea.

If you make a static analysis tool, may I suggest making it possible to use in other tools/applications.

Wesner Moise

I believe that the Phoenix compiler framework that Microsoft is developing will address extensibility issues, so third-parties can build all sorts of cool tools on top.

Since I am just one person, I need to do the minimal amount, and can’t build an extensible framework that has to anticipate and implement every developer’s needs.

There is Cecil, which is a free introspection engine. Also, I believe that there may be some reflection enhancements in Whidbey that eliminate some of the advantages of the introspection engine, I believe.

Omer van Kloeten

How extensible is this static analysis tool going to be?
I've had plans of creating one myself and even took steps to accomplish this, but never got around to finishing it.

George Tsiokos

Feature request: Exceptions!
I'm looking for a static analysis tool that can tell me all possible exceptions for an object's method call, constructor, etc. I would also like details on the code-path that generates the exception and not have specific ties to a specific framework version (so I could run an analysis of App X against .NET 1.1). From this post, it seems this should not be difficult for this tool to report.

The comments to this entry are closed.