JPDev@programming.dev to Programmer Humor@programming.dev · 2 years agoReview Pleaseprogramming.devimagemessage-square60fedilinkarrow-up1807arrow-down116
arrow-up1791arrow-down1imageReview Pleaseprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 2 years agomessage-square60fedilink
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up86·2 years agosets the diff to ignore whitespace Lines changed: 3
minus-squarekamen@lemmy.worldlinkfedilinkarrow-up27arrow-down1·2 years 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·2 years 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·2 years agoThat’s what “toggle whitespace diff” is for.
minus-squarekamen@lemmy.worldlinkfedilinkEnglisharrow-up2·2 years 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.
sets the diff to ignore whitespace
Lines changed: 3
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.