Mac-統計代碼行數

參考

第一種:

  1. cd 進入到目標目錄
  2. 輸入 type
  3. 輸入
    find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l

第二種:

  1. 安裝 cloc
    brew install cloc

  2. cd 進入目標目錄

  3. 統計
    cloc ./
    在這裏插入圖片描述

  4. 排除某文件夾代碼,常見 pods
    cloc ./ --exclude-dir=Pods

=================================================================
個人博客
Github
個人公衆號:Flutter小同學
Flutter小同學
個人網站

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章