JPDev@programming.dev to Programmer Humor@programming.dev · 1 year agoReview Pleaseprogramming.devimagemessage-square60fedilinkarrow-up1807arrow-down116
arrow-up1791arrow-down1imageReview Pleaseprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 1 year agomessage-square60fedilink
minus-squarekamen@lemmy.worldlinkfedilinkarrow-up27arrow-down1·1 year agoThe pipeline should handle formatting. No matter how you screw it up, once you commit, it gets formatted to an agreed upon standard.
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up2·1 year agoSome diff tools don’t handle indentation by default. So if you add a wrapper, it counts everything inside it as “changed”
minus-squarekamen@lemmy.worldlinkfedilinkarrow-up2·1 year agoThat’s what “toggle whitespace diff” is for.
minus-squarekamen@lemmy.worldlinkfedilinkEnglisharrow-up2·1 year agoPre-commit hooks is a common approach to this, so that whatever is committed gets processed. Another possibility would be to set a bot on the repo to do automated commits after human-made ones, but that can get a little noisy.
The pipeline should handle formatting. No matter how you screw it up, once you commit, it gets formatted to an agreed upon standard.
Some diff tools don’t handle indentation by default.
So if you add a wrapper, it counts everything inside it as “changed”
That’s what “toggle whitespace diff” is for.
You can do that? How?
Pre-commit hooks is a common approach to this, so that whatever is committed gets processed. Another possibility would be to set a bot on the repo to do automated commits after human-made ones, but that can get a little noisy.