How to find out how many lines of code there are in an Xcode project?

Dave picture Dave · Jan 5, 2010 · Viewed 89.9k times · Source

Is there a way to determine how many lines of code an Xcode project contains? I promise not to use such information for managerial measurement or employee benchmarking purposes. ;)

Answer

Joshua Nozzi picture Joshua Nozzi · Oct 24, 2010

I see this floating around and use it myself:

find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.swift" ")" -print0 | xargs -0 wc -l