Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Statistics from C++ source code [closed]

Do you know any type of tool, possibly for Linux and open source, that can be used to extract statistics from C/C++ source code files.

Apart from the number of lines, I would be interested in:

  • number of comment lines
  • number of classes used
  • number of declarations

and so on.

like image 592
draniris Avatar asked Feb 17 '23 08:02

draniris


1 Answers

I use CLOC (http://cloc.sourceforge.net/) for counting lines of code, blank lines and comments. However CLOC does not interpret the code and thus cannot count classes, declarations etc.

And one should probably mention that this kind of statistics is considered meaningless by most people...

like image 197
Alexander Tobias Bockstaller Avatar answered Feb 28 '23 10:02

Alexander Tobias Bockstaller