title: Line counter for ASP.NET
body: <p>I know the number of lines of code is completely arbitrary and a horrible metric. Even so, after a long day I like to click a little button and see that my <strong>pet project</strong> grew by 10%. (Or if I spent the day refactoring yet again it slimmed down by 10%, woohoo!)</p>
  
  <p>I've used two <a href="http://www.codeproject.com/KB/dotnet/LineCountUtility.aspx" rel="nofollow noreferrer">line</a> <a href="http://www.codeproject.com/KB/macros/linecount.aspx" rel="nofollow noreferrer">counters</a> that can analyze code from CodeProject in the past, but they only handle .cs files, completely dismissing my extensive work in .aspx, .asmx, .js, .css, etc.</p>
  
  <p>Has anyone used a line counter that could parse all the text files usually found on a typical ASP.NET site?</p>
  
  <h2>Update</h2>
  
  <p><strong>CMS recommended CLOC</strong>, which was indeed exactly what I was looking for. Here's my output for the curious. It even counted my MSBuild script!</p>
  
  <pre>
  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
  -------------------------------------------------------------------------------
  </pre>