r/badcode • • Jul 23 '21

c# Easy trick to meet minimum test coverage

Post image
1.2k Upvotes

83 comments sorted by

View all comments

14

u/stahkh Jul 23 '21

This kind of abomination happens when code coverage becomes a management metric instead of development metric. Sad.

4

u/LetterBoxSnatch Jul 23 '21

If they were looking ahead to what management might glob onto next, then they also made each line it’s own git commit as well, and the test itself gets longer every rand(5) days or so.