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?
Go to Search -> Find in Files... or use Ctrl+Shift+F
Find what: \S+\s*\r\n
Filters: *.php
Search Mode Regular expression
Click Find All
See the 'Find result' in the lower pane
It's not perfect at all, but it works out of the box. Of course you can also make changes to the regular expression, like only counting lines with:
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.
Linux:
find -name '*.php' | xargs grep -av '\r' | wc -l
Windows (PowerShell):
(dir -include *.php -recurse | select-string "(?!^$)").count
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With