coding

Count Lines of Code

还在用wc来统计代码行吗?你就 OUT了,这里有专门的工具:cloc

$ sudo apt-get install cloc

$ cloc . --exclude-dir=.venv --exclude-dir=openstack
    7987 text files.
    3320 unique files.                                          
    4800 files ignored.

http://cloc.sourceforge.net v 1.60  T=69.13 s (40.7 files/s, 10236.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Python                        2405         110203         148307         368070
Javascript                     327           6042           6758
查看详细