Ask a questionAsk a question
 

QuestionCode analysis apis/tools

  • Monday, October 26, 2009 8:13 PMmonkeyget Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    FxCop and Visual Studio's Code Analysis are very nice tools but I'd like to perform my own static code analysis.

    I am looking for apis/frameworks/... to programmatically inspect our .NET projects.
    I'd like to write code able to do things like :
    • list methods which instantiate an object of class x
    • find methods containing a variable named x
    • list the callees of methods x
    • ...

    Just to be clear I am not looking for an existing tool such as FXCop but I am rather looking for some kind of api allowing me to perform whatever kind of static analysis I fancy.

All Replies

  • Tuesday, October 27, 2009 3:59 PMNicole Calinoiu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Are you aware that FxCop exposes an API allowing you to create custom rules?  If you're looking for something more general, there's always the reflection API that's included in the .NET base class library...