Code line counter

Pierre-Paul Lavoie ppl at
Tue Nov 28 12:52:56 GMT 2006

Yes of course. wc gives what I would call the most trivial LOC metric.
There are many third party programs that can give you different

Personally I'd go with that instead of trying to implement my own.


On 11/28/06, Andreas Pakulat <apaku at> wrote:
> On 28.11.06 07:49:33, Pierre-Paul Lavoie wrote:
> > On the command line, the word count program comes with every Linux. It
> > can also count lines with the -l option.
> >
> >     e.g.
> >         cd src/
> >         wc -l *.cpp *.hpp
> Which normally doesn't reflect the LOC at all, due to the large amount
> of documentation in good programs ;)
> But a simple parser that throws away C/C++ comments and preprocessor
> directives is easily implementable with flex/bison.
> Andreas
> --
> Day of inquiry.  You will be subpoenaed.

More information about the KDevelop mailing list