Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source code words and line counting in netbeans 7.x?

I am Computer Science student and working on a project in java through netbeans 7.0.1 to be submitted in college, Today my faculty asked me how much your project is completed and i confidently replied that, Yes sir approx 50% completed already, he said how many lines u code, and i just go "Ummmm don't know exactly Sir", he replied, "Are you actually working or just buying it from somewhere!", my mind go blank!!! :D
I googled for this and found a WordCount Plugin for netbeans, but it does not working in NetBeans 7, or may be i do't know how exactly it works..
Any substitute for this WordCount available for NetBeans 7.x?
Or any other way, except manual counting of line in whole application?

like image 283
Asif Avatar asked Dec 07 '22 17:12

Asif


2 Answers

It's not part of Netbeans, but I use CLOC for this and find it does a nice job - identifies different languages well, reports on how many lines are comments, how many are code and so on.

like image 71
Michael Berry Avatar answered Dec 09 '22 06:12

Michael Berry


Since a 'nix-based answer has been given, in Windows you could accomplish something similar with Powershell:

get-content *.java | measure-object -line
like image 24
Aaron Avatar answered Dec 09 '22 06:12

Aaron