At a company, my manager had this idea to add points...using jenkins API...for any commits and successful builds, tests and deduct when the builds failed. The idea was to promote frequent commits and releases.
People ended up manipulating the system to score more without adding much value to code but even then they were a little miserable. The manager tried to justify the system but the system was taken down after a year or so.
You just described the effects of gamification (also of rewarding behavior - parents listen up ;)
The reward process becomes the game, measurements get manipulated, the original purpose goes under the bus.
People are not birds or rats, we learn to manipulate the hand feeding us but in the process lose motivation for the original behavior and our relationship with the hand gets reduced to a transactional one.
Really counterproductive and destructive long term.
People ended up manipulating the system to score more without adding much value to code but even then they were a little miserable. The manager tried to justify the system but the system was taken down after a year or so.