For HTML, CSS, and JavaScript files, what's a good tool to run on source directories and get KSLOC?
not sure why this was downvoted. It does the trick and gives a meaningful number that's pretty much just as useful as any other SLOC metric.
Mr. Shiny and New
2009-05-06 15:04:38
fair enough. i was interested in an automated, configurable tool with reporting and code visualization options. but unless mgmt presses for more, a raw count will suffice.
happyappa
2009-05-06 16:29:10
+2
A:
grep -v -P "^\s*$" -R dir/ | wc -l
Gives you a line count that ignores blank lines.
Mr. Shiny and New
2009-05-06 15:09:56
thx. i'm on a solaris box, and a couple of those grep args aren't supported in this environment. ended up w/ something like: find dir/ | xargs grep -v "^$" | wc -l
happyappa
2009-05-06 16:31:18