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

前端 未结 15 1597
闹比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:59

    1. open terminal
    2. navigate to your project
    3. execute following command inside your project:

      find . -path ./Pods -prune -o -name "*.swift" -print0 ! -name "/Pods" | xargs -0 wc -l
      

      Or:

      find . -path ./Pods -prune -o -name "*[hm]" -print0 ! -name "/Pods" | xargs -0 wc -l
      

    (*Excluding pod files count from total count)

提交回复
热议问题