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

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

    Steps to implement CLOC library in Mac as below:

    1. Open terminal

    2. Install Homebrew using command as below,

      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

      Copy & paste this command, including double quotes in terminal

      Enter system password & click enter.

    3. You will see the terminal screen as below,

    4. System will popup so many permissions, please allow all the permissions

    5. If everything goes fine, you will see terminal screen as below,

    6. Redirect to project folder using cd drag & drop project folder path to terminal

    7. Now its time to install CLOC using below command

      cloc . --exclude-dir=Pods used to exclude pod files

      cloc . including pod files

    8. If everything goes fine, it will display the number of lines of code as below,

      Hope it will help someone.

提交回复
热议问题