API for Static Code Analysis - C#

138 views
Skip to first unread message

Guilherme Utrabo

unread,
Apr 1, 2014, 4:03:44 PM4/1/14
to dotnetde...@googlegroups.com
I'm searching for an API to help me make static code analysis for an academic project. My goal is to develop a program that will scan the source code of a given software and build a table like this:

  Table1Table2Table3
Page1.aspx   Write
Page2.aspx  Read/Write 
Page3.aspx  ReadWrite  

I'm not trying to make this application generic, because the effort required to that would exceed the time window of the project. The application should work when analyzing code with this specific (MVCish) architecture:

Service: Responsible for reading and writing to the database. In order to do that, uses the class Persistence, which have two methods: Save(table) and Find(table)

Controller: Responsible for calling the service when the presentation layer requires.

Page:  Calls the controller when it needs to read or write to the database. WebForms. I know.

The idea is simple, the application would find references to Persistence.Find() and Persistence.Save() in the service and map the flow until it arrives in a page.
Finding those strings in the files is simple, the hard part is to map the flow to the page.

I've found the Roslyn Project and it seems it might be of some help.
I would appreciate advice or indications of APIs.

Regards,
Guilherme
Reply all
Reply to author
Forward
0 new messages