3 ms·
Worst offender is when a dev decides to reformat code and you can't even differentiate at a glance what is real code change and what is reformatting. Fortunate
by hu3 3y ago
Worst offender is when a dev decides to reformat code and you can't even differentiate at a glance what is real code change and what is reformatting.
Fortunately modern tooling formats code automatically so there's less bikeshedding.
- ahoka 3y agoJust set to ignore whitespace in the review diff.
- DarkPlayer 3y agoThere are some tools that can separate actual code changes from reformatting changes. I am working on https://semanticdiff.com https://semanticdiff.com, a VS Code Extension / GitHub App that can help you with this. There is also difftastic if you prefer a CLI based solution. It supports more languages but can detect fewer types of reformatting changes.
- tubthumper8 3y agoI like this idea of advancing beyond line-based diffs into something more meaningful. If someone renames a variable/type/module/whatever which changes X lines of code across Y files, I really don't care to see all of that, for what I'm concerned with that's a single diff. (Assuming the code is in a language with a good type system and without reflection, I'm confident in automatic refactors and don't need to spend time on them in code review)
- deleted 3y ago[deleted]