简体   繁体   中英

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 tedious 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.

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#.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM