jianzong
5.92D

数一数你的 iOS 项目行数

  •  
  •   jianzong · Jan 22, 2015 · 2721 views
    This topic created in 4310 days ago, the information mentioned may be changed or developed.

    不数不知道,一数吓一跳,本来以为自己在写2k行代码的项目,数出来居然是13k。

    在terminal中cd到项目目录:

    find . "(" -name "*.h" -or -name "*.m" -or -name "*.mm" -or -name "*.hpp" -or -name "*.cpp" -or -name "*.c" -or -name "*.cc" ")" -print0 | xargs -0 wc -l

    可以打印出每个文件的行数。

    4 replies  •  2015-03-06 13:12:02 +08:00
    dcty
    dcty
    Jan 22, 2015
    1
    414825 total
    但是没有什么实际的参考意义。
    jianzong
    jianzong
    OP
    Jan 22, 2015
    2
    @dcty 包含第三方库吗?
    dcty
    dcty
    Jan 22, 2015
    3
    @jianzong 673373 total
    TL
    TL
    Mar 6, 2015❤️1
    4
    @jianzong 可以用 cloc 这个比较准确,除去注释,空行等。

    http://cloc.sourceforge.net/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1162 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 17:50 · PVG 01:50 · LAX 09:50 · JFK 12:50
    ♥ Do have faith in what you're doing.