r/ProgrammerHumor • • 17h ago

Meme checkBuildSettings

Post image
2.9k Upvotes

67 comments sorted by

View all comments

Show parent comment

22

u/nfsp-g35 13h ago

I guess it depends on your source control strategy. If it were me and I was using using gitflow (assumption since you said dev branch) then protect the dev, test, stage, prod, main or whichever branches actually represent an environment... but I personally don't like to force too strict of rules on every branch or even run CI if there's no PR/MR, it burns lots of build minutes, generates noise, and can run counter to commit/push early and often. That said, I'd still prefer your approach to the wild-west, no rules nonsense that I've seen waaay too much in the industry. 

11

u/FabioTheFox 13h ago

Oh yeah totally, my wording might have been a bit off I was talking about PRs to any of the main branches (the ones you mentioned)

People can do whatever they want on their own feature branch but when it's time to push the code into one of them then they gotta pass all the checks first

2

u/LinAGKar 5h ago

That's sorta what we did at my job. If you have warnings, it will still successfully build and run the tests, but a check at the end of the CI pipeline will fail the pipeline if you have introduced warnings. And as long as the pipeline is failing, you can't merge. But yeah, that does mean we get a pipeline failure message even if we haven't created an MR yet.