Static source code analysis for C # that works at source level

Current source code analysis tools for C # (or other .NET languages) usually work at the assembly level. They use reflection to analyze code.

Are there tools available that only work at the source level (like lint for C)?

+2


a source to share


5 answers


IIRC, SourceMonitor works at the code level as well as Microsoft StyleCop .

SourceMonitor:

The free SourceMonitor allows you to see the source code inside your software to see how much code you have and to determine the relative complexity of your modules.



StyleCop:

StyleCop parses C # source code to apply style and sequence rules. It can be run from within Visual Studio or integrated into an MSBuild project.

+1


a source


There are several tools (even R # does this), the right tool depends on the analysis you want to perform.



The special tool that does this is CodeIt.Right .
Another way is to use a parser (like Sharp Development ) and do the parsing using your own code.

+1


a source


Have you watched StyleCOP? It analyzes the source code and raises the source level problems. Otherwise, what's the problem with running on IL?

0


a source


If you are considering commercial analyzers, I appreciated the Klocwork Insight and this is clearly the original analysis for C #.

0


a source


My company provides Metrics Analysis and Code Duplication Analysis for C # , as well as a generic tool for building arbitrary analysis and / or transformations, directly to C # source code. The tools can work with both complete files and individual files.

0


a source







All Articles