We have lots of evil csh which we want to convert to bash or even perl or python. So I decided to test some code line counting tools to estimate the effort involved in terms of pure lines of code. I tested 2 options: the old and venerable cloc and the child of web 2.0 ohcount. Like the definition of the metre, what constitutes a line of code can vary a bit.
Examining 16633 file(s) | ||||||
---|---|---|---|---|---|---|
Language | Files | Code | Comment | Comment % | Blank | Total |
java | 2737 | 227551 | 102476 | 31.1% | 61095 | 391122 |
xml | 1814 | 87627 | 5470 | 5.9% | 3134 | 96231 |
xmlschema | 418 | 69194 | 8743 | 11.2% | 753 | 78690 |
javascript | 423 | 41392 | 9386 | 18.5% | 5096 | 55874 |
html | 429 | 19675 | 580 | 2.9% | 2025 | 22280 |
css | 86 | 8697 | 619 | 6.6% | 1951 | 11267 |
sql | 10 | 7289 | 246 | 3.3% | 168 | 7703 |
xslt | 47 | 3092 | 636 | 17.1% | 569 | 4297 |
php | 2 | 600 | 110 | 15.5% | 102 | 812 |
bat | 11 | 575 | 22 | 3.7% | 166 | 763 |
scala | 5 | 552 | 35 | 6.0% | 99 | 686 |
python | 29 | 544 | 786 | 59.1% | 419 | 1749 |
shell | 18 | 502 | 95 | 15.9% | 99 | 696 |
make | 6 | 356 | 24 | 6.3% | 78 | 458 |
Total | 6036 | 467707 | 129228 | 21.6% | 75759 | 672694 |
Cloc gives similar numbers off by a few thousand and separated by csh vs bash. Ohcount could do with some more shell script discrimination.
No comments:
Post a Comment