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

前端 未结 15 1587
闹比i
闹比i 2020-11-30 16:32

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 purp

15条回答
  •  [愿得一人]
    2020-11-30 16:56

    In terminal, change into the project directory and run:

    find . -type f -print0 | xargs -0 cat | wc -l
    

    If you want only certain file types, try something like

    find . -type f -name \*.[ch]* -print0 | xargs -0 cat | wc -l
    

提交回复
热议问题