Is there a way in Code::Blocks to check how many lines of code are contained in the entire project or workspace that you are working in?
Is there a way in Code::Blocks to check how many lines of code are contained in the entire project or workspace that you are working in?
You could always use the command "wc". I'm not sure if Code::Blocks has anything or not.
It's pretty easy to write your own line counter, but of course, it wouldn't be integrated with Code::Blocks.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Oh please.....why would I want to write my own line counter in a matter of minutes which would take up maybe 50 lines of code at most when I could be lazy and have another person do it for me?
Very well, try mine. It's called makewc.sh in here: http://dwks.theprogrammingsite.com/m...-svn-89.tar.gz
You asked for it.
[edit] That's assuming you have bash, which you might not. [/edit]
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
gnuwin32 has a "wc" program that lists lines, words and characters per file. Assuming you don't have lots of "spare" .C/.CPP files (etc) laying about in the same directory, and not too many directories in your project, something like:
will give you a list of filenames and the respective number of lines, along with a total for all files.Code:c:\myprojects\thisproj\>wc --lines src\*.cpp inc\*.h
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
My shell script does basically that, except it works for multiple directories and filenames with spaces in them. (Well, the latest version does. That one doesn't.) It also discards .c files when there are corresponding .y files, because that's something I needed.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
would also work, as long as you don't overflow the command line.Code:find -iname "*.{cpp,hpp}" | xargs wc --lines
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law