开发者

CruiseControl MSBuild Automate Lines of code calculation in source

In my company we are using cruise control to automate daily builds开发者_高级运维 of the codebase. This is done through MsBuild tool. FxCop is already integrated into MsBuild

The Platform details are:-

  1. Visual Studio 2010
  2. C# .NET 3.5
  3. WPF

Has any one used this to automate calculation of the lines of code in each build so we can calcuate the number of lines added in each build? Please provide any suggestions


The VS2010 code metrics power tool (download link) includes the number of lines of code as one of the metrics along with a few others.

From the docs:

Indicates the approximate number of lines in the code. The count is based on the IL code and is therefore not the exact number of lines in the source code file. A very high count might indicate that a type or method is trying to do too much work and should be split up. It might also indicate that the type or method might be hard to maintain.

You could run this tool as part of the build process via an exec task, merge in the tool's output (a simple XML file) into the main build log via a merge block, then display the number of lines of code via a simple XSLT on the web dashboard.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜