Code Analysis in VSTS
I need to do static c开发者_如何学运维ode analysis in vsts 2010. Are there any built-in code analyzer in vsts? Is there any other way than using FxCop.
The Visual Studio 2010 Premium and Ultimate editions include an integrated static analysis tool (http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison). This tool is based on exactly the same static analysis engine as FxCop, although the version that ships with VS has some additional rules as well as offering integration with the VS UI.
Another static analyzer that is integrated in VS 2010, 2008 and 2005 (all versions except Express) is the tool NDepend. Here is a screenshot made from VS 2010:
You can add a Task "Sonar Qube" and install it Free from VSTS market place. This is great tools which goes above and beyond just static code analysis.
Please check article C# Code Coverage using VS2010 - http://blogs.msdn.com/b/syedab/archive/2011/03/11/c-code-coverage-using-vs2010.aspx
Use the SonarQube build step extension, can be found in the marketplace if its not a step by default. Its really great and open source!
SonarQube with VSTS
I understand that you want a "code analysis" step in your Visual Studio Team Services (VSTS) Build Definition. If this is correct then you can Install https://marketplace.visualstudio.com/items?itemName=TotalALM.totalalm-codeanalysis from the marketplace and download if you wish this to be used with TFS.
Hope this helps.
If your code is open source you can use sonarcloud for free, it's sonarqube saas
精彩评论