I\'ve written a little script to iterate across files in folders to count lines of code.
The heart of the script is this function to count lines of whitespace, comments,
Can't see much wrong with that other than the fact you will count a single brace with trailing spaces as code instead of whitespace.