开发者

Any alternatives for code analysis in .net apart from FxCop?

I was wondering if there are any alternatives for code analysis. I suppose one can create a code analyser from scratch though this is a te开发者_运维技巧dious work and I am not sure it worths it after all. Is there other, non .net specific, analysers?

Thanks, Sun


NDepend is a commercial tool (with a Open Source / Academic Edition edition) that can do all sorts of analysis for you. Although it overlapps with FxCop for some rules, at has many more features.

I suppose one can create a code analyser from scratch

Everything is possible, but writing any validation tool that has any meaning costs large amounts of time. If your boss pays you for developing software, you will be burning his money. Writing your own analyzer is a good exercise, but will further be a complete waste of time.


http://www.mono-project.com/Gendarme open source and free.

https://github.com/unintelligible/GendarmeMsBuild is a nice add-on for it.


I think ReSharper also has some Code Analysis features, search here in SO as well.

I found this one btw: http://www.itscodingtime.com/post/Visual-Studio-Code-Analysis-vs-FxCop-vs-StyleCope280a6-whats-the-diff.aspx

Also have a look at Sonar Source:

http://www.sonarsource.org, this is open source :)


My company offers a variety of tools for analyzing C#.

  • Our CloneDR detects exact and near-miss duplicate code detector.
  • There is a C# Metrics tool.
  • The DMS Software Reengineering Toolkit is a foundation for building whatever custom analysis tool you want. There is a C# Front End that handles parsing/tree building for all of C# 4.0.

You are asking about analysis tools in a broad way, so I'll assume you are not just interested in static analysis. We also provide (dynamic analysis based) test coverage and profilers for C#.


As said by Davide Piras, you should definitively take a look at sonar C# plugin ecosystem. I am one of the main contributors of the project, I do not belong to sonarsource. These plugins and sonar itself are open source. The license is LGPL and hence business friendly.

If you want to see sonar in action on C# project, take a look to the demo instance :

http://nemo.sonarsource.org/dashboard/index/org.mybatis:mybatisdotnet

The official documentation is available here :

http://docs.codehaus.org/display/SONAR/C-Sharp+Plugins+Ecosystem

If you need help or have any question regarding the installation process, feel free to subscribe to the user mailing list :

http://www.sonarsource.org/support/support/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜