ASP.NET的行计数器

Dav*_*cia 4 c# asp.net

我知道代码行数是完全随意的,也是一个可怕的指标.即便如此,经过漫长的一天,我想点击一个小按钮,看到我的宠物项目增长了10%.(或者,如果我花了一天时间再次重构,它会减少10%,哇喔!)

我曾经使用过两个可以分析CodeProject代码的 计数器,但它们只处理.cs文件,完全忽略了我在.aspx,.asmx,.js,.css等方面的大量工作.

有没有人使用行计数器来解析通常在典型的ASP.NET站点上找到的所有文本文件?

更新

CMS推荐CLOC,这确实是我想要的.这是我对好奇的输出.它甚至计算了我的MSBuild脚本!

C:\Web>cloc-1.06.exe --exclude-dir=.svn,bin,images AST
     474 text files.
     474 unique files.
   28254 files ignored.

http://cloc.sourceforge.net v 1.06  T=70.0 s (6.3 files/s, 737.7 lines/s)
-------------------------------------------------------------------------------
Language          files     blank   comment      code    scale   3rd gen. equiv
-------------------------------------------------------------------------------
C#                  332      4670      9666     21255 x   1.36 =       28906.80
ASP.Net              91        58         0      4053 x   1.29 =        5228.37
Javascript            9      1262      2112      4011 x   1.48 =        5936.28
CSS                   5       193        42      1665 x   1.00 =        1665.00
MSBuild scripts       1         0         7      1413 x   1.90 =        2684.70
HTML                  2       126         5       429 x   1.90 =         815.10
XML                   1         0         0       392 x   1.90 =         744.80
PHP                   1        21        13       249 x   3.50 =         871.50
-------------------------------------------------------------------------------
SUM:                442      6330     11845     33467 x   1.40 =       46852.55
-------------------------------------------------------------------------------

CMS*_*CMS 6

看看CLOC

检查输出:

-------------------------------------------------------------------------------
Language          files     blank   comment      code    scale   3rd gen. equiv
-------------------------------------------------------------------------------
ASP.Net              21       290         0      3424 x   1.29 =        4416.96
XML                   1         0         0        26 x   1.90 =          49.40
DOS Batch             1         1         0         8 x   0.63 =           5.04
C#                    1         0         0         4 x   1.36 =           5.44
-------------------------------------------------------------------------------
SUM:                 24       291         0      3462 x   1.29 =        4476.84
-------------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)

您还可以查看其他代码计数器: