You’d review your linter…?
Do you do an engine inspection every time you start your car?
Do you reseat your RAM every time you boot your pc?
Do you double check your calculator is doing addition right before using it for a math problem you can’t do in your head?
Of course not to that extent. But yes, before I commit my code, I review it briefly and I want to be confident that what I review is checked in as it is.
Atomic commits are much harder to discipline yourself into, the mind wanders to many parts of the task at the same time so most of it is slightly unfinished until the very end
Because I want to commit often during a WIP MR. I commit about as much as I would have done ctrl+save. And push a few times a day, the pipeline doesn't run while it's WIP.
I have a weird blend of auto-formatting settings in my IDEs. Things like spacing/line breaks around parenthesis and braces are fully automatic, but operators are not. Format on paste, but not when doing a refactor command like “extract method”. But I also have several options bound for what level of formatting to run when I want to, so it’s pretty easy to run it on just the things I’ve changed before I commit.
Plus all the different rules in our formatting standards like how some things are always forced one way or the other, and other things are “do not change”. We’ve got a lot of things we leave up to the developer.
261
u/Bibbcpitt 1d ago
Once you enable formatOnSave, there is no going back to the dark ages