Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: New metric "Number of git commits" #313

Open
doomguy opened this issue Jan 5, 2022 · 1 comment
Open

RFE: New metric "Number of git commits" #313

doomguy opened this issue Jan 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@doomguy
Copy link

doomguy commented Jan 5, 2022

Describe the enhancement
Another interesting metric would be the number of git commits done on a file. Files which get touched a lot (hotspots) can indicate complicated / high maintenance code. On the contrary, files which only got touched once or twice and are reasonable complex could indicate a lack of auditing or refinement.

Cf. https://www.infoq.com/presentations/code-bugs-legacy-pitfalls/

Example

% git log --name-only --pretty=format: | grep -v ^$ | sort | uniq -c | sort | tail
  65 internal/auth/auth.go
  66 internal/domain/domain.go
  70 CHANGELOG
  70 internal/source/domains.go
  72 go.sum
  78 VERSION
  83 go.mod
 113 main.go
 122 acceptance_test.go
 154 app.go

Thanks for considering.

Cheers!
/Doomguy

@boyter
Copy link
Owner

boyter commented Jan 5, 2022

I have thought about this, and I think it best served by another tool, which may include scc as a library or some such. Ripsrc did this to an extent https://github.com/pinpt/ripsrc

I don't know if I am willing to implement this myself, although its something I think I might need in the future with some ideas I have so you never know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants