github-vet / bots

Bots for running analysis on GitHub's public Go repositories and crowdsourcing their classification.
MIT License
1 stars 1 forks source link

Collect some nerdy statistics #113

Closed kalexmills closed 3 years ago

kalexmills commented 3 years ago

Since one of the goals is to read every line of Go on GitHub (subject to sync delays), it might be neat to come up with some statistics as well. This is total cruft, but not really uninteresting or intrusive cruft, and it could also help out as a sanity check.

Some things worth measuring, on a per-repo basis.

Lines of code

1) the total number of lines of code 2) total number of lines of vendored code 3) total number of lines of test code

Number of files

1) number of test files 2) total number of files (total number of _test files) 3) number of files without a matching test (the most complicated stat here)

Language constructs

1) number of function declarations 2) number of function calls 2) number of range loops 2) number of unary expressions 3) number of reported loopclosure errors 3) number of reported looppointer errors