Skip to main content
Participant
April 6, 2007
Question

Count lines of code

  • April 6, 2007
  • 5 replies
  • 3397 views
Can anyone suggest a good tool to "count lines" of ColdFusion code? Does Dreamweaver 8 have any built in support?

Management is hounding us for LOCs, metrics, function points, etc. A nice automated report would be great!

Thanks, Greg
    This topic has been closed for replies.

    5 replies

    BKBK
    Community Expert
    Community Expert
    April 7, 2007
    You will be surprised if you write your own CFML function to count the number of lines in each text file in a directory. You will find that your result will be of the same order of magnitude as that of any tool out there.

    Participant
    April 7, 2007
    I think what I am looking for is something that can count physical (line breaks) and logical (tags/statements) lines of code in a directory.
    (see http://en.wikipedia.org/wiki/Source_lines_of_code)

    I was hoping Dreamweaver 8 would have something in Sites -> Reports menu to count LOC for the languages it supports (CF, ASP, etc). But can't find anything.

    I assume their is something out their that would count SLOC with a few clicks?
    BKBK
    Community Expert
    Community Expert
    April 7, 2007
    > Can anyone suggest a good tool to "count lines" of ColdFusion code?

    A combination of some of <cfcomponent>, <cffunction>, <cfdirectory>, <cffile action="read"> and the delimiters #chr(13)# and #chr(10)#.

    Inspiring
    April 6, 2007
    Paste it into word and use it's word count feature.
    April 6, 2007
    Use a tool like SR32 from www.funduc.com and search your directory for all occurrences of ASCII 10. SR32 will give you the name of each file and the number of lines in each file.