If you want a measure of code quality, count the number of commits with “cleanup” (and similar) comments.
Inexact, but it has the virtue of being *obviously* inexact, unlike certain metrics I could name.
Of course, that would get gamed the instant it was used to manage worker bees.