LoginSignup
11
10

More than 5 years have passed since last update.

アプリの総ファイル数やコードの総行数を表示してみる

Last updated at Posted at 2016-04-08

がんばって作ったアプリ、今何行コードを書いたか知りたいことありますよね。
clocを使って調べてみましょう。

Homebrewのインストール

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

<参照>
http://brew.sh/index_ja.html

clocのインストール

Terminal.app
$ brew install cloc

clocの実行

Terminal.app
$ cloc /Desktop/アプリのフォルダ

    2200 text files.
    1320 unique files.                                          
     989 files ignored.

http://cloc.sourceforge.net v 1.64  T=9.03 s (134.4 files/s, 11841.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Objective C                    259           8956           5159          37445
C/C++ Header                   646          10475          17622          16255
D                              276              0              0           4422
Objective C++                   17            827            302           3682
C++                              1            164            156            754
Swift                            3             65             33            212
Bourne Shell                     7             32             19            179
JSON                             4              0              0            154
-------------------------------------------------------------------------------
SUM:                          1213          20519          23291          63103
-------------------------------------------------------------------------------

こんな感じで出力されます。
たくさん書きゃいいってもんじゃないですが、気になった人はぜひ調べてみてはいかがでしょうか。

11
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
10