views:

84

answers:

2

Hello!

In particular, I am interested to know how many lines of codes there are, but this spans across many files.

I have been using notepad++ to author the code and for each file it does display line numbers but of course I have empty returns to make the code more readable.

Does anyone know of a plugin or tool that I can accurately get the actual lines of code?

+2  A: 

Google for "php sloc counter". There are plenty of tools to do that, for example:

http://thecodecentral.com/2007/12/26/source-line-of-code-counter

However, this kind of measuring is absolutely useless, so I'm not sure why you would want to do this.

houbysoft
A: 

Linux:

find -name '*.php' | xargs grep -av '\r' | wc -l

Windows (PowerShell):

(dir -include *.php -recurse | select-string "(?!^$)").count
silent
1) He mentioned Notepad++ so he's on windows.2) This would count all lines, not sloc, which is what he wants.
houbysoft
added powershell variant ;)
silent
and empty lines is not in counted now
silent