3 ms·
Most diff programs have an "ignore whitespace" option. "whitespace noise on diffs" is pretty much a solved problem. You can even add '?w=1' to a Github URL to t
by pyre 10y ago
Most diff programs have an "ignore whitespace" option. "whitespace noise on diffs" is pretty much a solved problem. You can even add '?w=1' to a Github URL to turn on the feature.
- scrollaway 10y ago1. That's a band-aid. The characters have still been changed - the diff still "exists". 2. Those options are not perfect, they don't always work as expected 3. Those options are not turned on by default (because that would be INSANE) 4. Git's not the only VCS, much as I wish it were 5. Github's not the only Git web UI; that option is not available everywhere. It's not a "solved problem". It's an artificial problem, that gets solved when you start consistently stripping trailing whitespaces on save and not realigning everything all the time.
- pyre 10y ago> It's an artificial problem, that gets solved when you start consistently stripping trailing whitespaces on save and not realigning everything all the time. This is mostly solved via coding standards. If there are no coding standards people will "refactor" the coding style when they touch various pieces of code. If people were following a consistent style, then the alignment wouldn't be changing all of the time. Although I strongly agree with the trailing whitespace sentiment. The most egregious offender that I've found is Eclipse putting trailing spaces on blank lines to bring them to the indent level of the non-blank lines. Ugh.
- scrollaway 10y agoenum { NORMAL = 1 ABNORMAL = 2 IRREGULAR = 3 } Now if you're writing like this, what happens when you introduce "EXCEPTIONAL = 4"? You change 3 other unrelated lines. This is something that alignment causes, regardless of "coding standards". Hell, gofmt does that... It looks pretty (to some extent - with long names and lots of members it gets unreadable), but creates so much noise.