I have a repository on GitHub from which I have to find some statistics, then I have to process this data in a Python script. In particular, the information I have to get is the number of lines of code modified in a certain amount of days, i. e. the number of lines of code added, deleted and modified. I tried to take a look at the bees of GitHub but unfortunately I have not found what I need, would anyone know how to advise me what to do? Thank you.
Asked
Active
Viewed 3,546 times
1
-
There are many ways of doing this, and already a many answers with nearly identical question titles, like https://stackoverflow.com/questions/26881441/can-you-get-the-number-of-lines-of-code-from-a-github-repository – msanford May 29 '19 at 14:12
1 Answers
0
You can use CLOC(“Count Lines of Code”), which will give you a breakdown of significant and insignificant lines of code by language.
cloc $(git ls-files)
This git ls-files
is same as xargs cloc
.
Or another way to get number of coded line is to use...
git ls-files | xargs wc -l

Urvi Soni
- 314
- 1
- 2
- 12