jorisroovers / gitlint

Linting for your git commit messages
http://jorisroovers.github.io/gitlint
MIT License
813 stars 99 forks source link

RFC: Use more common exit code logic #194

Open l0b0 opened 3 years ago

l0b0 commented 3 years ago

gitlint has a unique concept of exit codes:

This is IMO suboptimal, for several reasons:

Would you be willing to consider (not necessarily implement the change) changing this to use a more common scheme? Something like this:

This shifts the three main existing errors down by 250, for a mnemonic change, and avoids the issues above.

jorisroovers commented 2 years ago

Yeah, if I were to re-implement gitlint today and with this extra information, that's probably what I would do. I was trying to be clever, that was dumb. Hindsight is 20/20 🤷‍♂️

Now I guess we need to choose between keeping backward compatibility or supporting the defacto standard. It’s unfortunate that we don’t have any data on how many users actually rely on the specific exit codes.

My gut feeling is that the vast majority of users don’t check for specific exit codes (other than >0). I’m not sure whether the ones that do have a strong preference on this and whether they’d prefer to go through the hassle of changing their wrapper scripts for the sake of following the standard (which has little merit by itself).

Long story short, I have no strong opinions here. Maybe @sigmavirus24 does?