Hi!
Today the question "does anyone know how many LOC we maintain" arose in
the #yast channel at the freenode.net IRC server.
And although most of us know about `wc -l` (in fact, my teammate Stefan
suggested running `wc -l **/*.{rb,cc,h}` in a full checkout), I quickly
wondered if someone already built a tool to perform such task against
all repos of a Github organization. And the answer is yes, Ben
Balter[1] did it 5 years ago and called it count-org-loc[2] which under
the hood uses cloc[3] (a tool written in Perl for counting blank,
comment, and physical lines of code in many programming languages) in a
similar way as it is explained in this[4] StackOverflow answer.
Although I was aware that the results do not answer the original
question, since not every repository at Github yast organization is
maintained by the YaST team core, I ran it against both, yast and
libyui Github organizations. You can see the results I got at [5] and
[6]. Just if you are as curious as I am :P
BTW, I installed cloc via npm[7] because the available 1-click
install[8] for Tumbleweed didn't work for me. Hope you can forgive me
:) :P
[1] https://github.com/benbalter
[2] https://github.com/benbalter/count-org-loc
[3] https://github.com/AlDanial/cloc#Docker-
[4] https://stackoverflow.com/a/29012789
[5] https://gist.github.com/dgdavid/086010eb369d895f121e76f0dc6154f4
[6] https://gist.github.com/dgdavid/90022844a5891a9aa893e961d1549b55
[7] https://github.com/kentcdodds/cloc#readme
[8]
https://software.opensuse.org/download/package?package=cloc&project=Documentation%3ATools
--
David Díaz
YaST Team at SUSE LINUX GmbH
IRC: dgdavid