问题描述
在绩效考核中,某项指标名为「千行代码BUG数」,即根据“总BUG数”与“代码行数”来计算“千行代码BUG数”。因此需要计算代码总行数。
本文将整理用于计算代码行数的工具。
# 使用GitStats工具
-「git代码统计工具git_stats」
-「GitHub/tomgi/git_stats」
这是我们目前正在使用的工具。
# 使用Gitinspector工具
https://github.com/ejwa/gitinspector
# 使用git-stats工具
https://github.com/IonicaBizau/git-stats
# 在GitLab中统计
「Count lines added by a developer」
「Commits API」
# 统计代码提交行数
「How can I calculate the number of lines changed between two commits in git?」
「How to count total lines changed by a specific author in a Git repository?」
git log –author=”<authorname>” –pretty=tformat: –numstat