在不克隆的情况下计算 GitHub 存储库中的行数
Count number of lines in a GitHub repository without cloning
有类似的问题,但它们都需要您克隆存储库,然后 运行 在其上使用一些实用程序。
我需要一个可以给我这些统计数据的网络服务(类似于使用 URL 例如 http://my-sloc-counter.com/project1
从 GitHub 获取项目 1 的 SLOC 统计数据)
对于 GitHub 具体而言,您可以通过 GitHub Statistics API 计算该数据(LOC:代码行数)的 近似值 。 =18=]
您可以在“Can you get the number of lines of code from a GitHub repository?”中查看示例,其中不涉及克隆存储库。
最近,您有项目 jolav/codetabs
(initally mentioned by Sclerosis), based on Curtis Gagliardi cgag/loc
用于计算代码行数。
它包括一项服务,用于计算任何 public GitHub 存储库的行数:
codetabs.com/count-loc/count-loc-online.html.
我的项目示例:https://api.codetabs.com/v1/loc?github=vonc/seec
问题(对于两种解决方案):他们确实计算了回购协议中 所有 文件的行数,所以如果你有 vendored files like in a Go project, you will have a hard time distinguishing what you wrote from what you have vendored.
有 Google Chrome 的浏览器扩展名为 Gloc。
有类似的问题,但它们都需要您克隆存储库,然后 运行 在其上使用一些实用程序。
我需要一个可以给我这些统计数据的网络服务(类似于使用 URL 例如 http://my-sloc-counter.com/project1
从 GitHub 获取项目 1 的 SLOC 统计数据)
对于 GitHub 具体而言,您可以通过 GitHub Statistics API 计算该数据(LOC:代码行数)的 近似值 。 =18=]
您可以在“Can you get the number of lines of code from a GitHub repository?”中查看示例,其中不涉及克隆存储库。
最近,您有项目 jolav/codetabs
(initally mentioned by Sclerosis), based on Curtis Gagliardi cgag/loc
用于计算代码行数。
它包括一项服务,用于计算任何 public GitHub 存储库的行数:
codetabs.com/count-loc/count-loc-online.html.
我的项目示例:https://api.codetabs.com/v1/loc?github=vonc/seec
问题(对于两种解决方案):他们确实计算了回购协议中 所有 文件的行数,所以如果你有 vendored files like in a Go project, you will have a hard time distinguishing what you wrote from what you have vendored.
有 Google Chrome 的浏览器扩展名为 Gloc。