Can you get the number of lines of code from a GitHub repository?

前端 未结 15 1111
庸人自扰
庸人自扰 2020-12-04 04:26

In a GitHub repository you can see “language statistics”, which displays the percentage of the project that’s written in a language. It doesn’t, however, display ho

相关标签:
15条回答
  • 2020-12-04 05:10

    Not currently possible on Github.com or their API-s

    I have talked to customer support and confirmed that this can not be done on github.com. They have passed the suggestion along to the Github team though, so hopefully it will be possible in the future. If so, I'll be sure to edit this answer.

    Meanwhile, Rory O'Kane's answer is a brilliant alternative based on cloc and a shallow repo clone.

    0 讨论(0)
  • 2020-12-04 05:12

    Pipe the output from the number of lines in each file to sort to organize files by line count. git ls-files | xargs wc -l |sort -n

    0 讨论(0)
  • 2020-12-04 05:14

    There is an extension for Google Chrome browser - GLOC which works for public and private repos.

    Counts the number of lines of code of a project from:

    • project detail page
    • user's repositories
    • organization page
    • search results page
    • trending page
    • explore page

    0 讨论(0)
提交回复
热议问题