4 ms·
Sure you will. Whoops, my regex got too long and now the diff is - filter: /\.(jimmy|jimbo|jeremiad)$/ + filter: + /\.(jimmy|jimbo|jeremiad|jam
by lainga 3y ago
Sure you will. Whoops, my regex got too long and now the diff is
- filter: /\.(jimmy|jimbo|jeremiad)$/
+ filter:
+ /\.(jimmy|jimbo|jeremiad|james)$/
. And it's not clear where the change is. GP's article has an example of that in a linked tweet.
- JasonSage 3y agoThis is fine for a text diff, but I want my code review tool to show me something different. Separate problem, and the flaw here isn’t the diff, or the tool that produced the diff, rather the tool displaying it to me. Let me do whatever I want to my code and show me BOTH the visual (unimportant) and semantic differences.
- nicky0 3y agoGood point. Are there any code-semantics-aware diff tool out there though?
- slackner 3y agoIf you're looking for a VS Code extension or a GitHub app, check out https://semanticdiff.com/ https://semanticdiff.com/. I'm a co-founder of this project. If you prefer a CLI tool, check out https://github.com/Wilfred/difftastic https://github.com/Wilfred/difftastic. It supports more languages, but doesn't recognize when code has been replaced by an equivalent version ("invariances"). So it will show some changes (e.g. replacing a character in a string with an escape sequence) even though they are technically equivalent.
- Cthulhu_ 3y agoIs that down to the formatter - which you've configured to enforce a certain line length (https://prettier.io/docs/en/options.html#print-width https://prettier.io/docs/en/options.html#print-width) - or the diff visualiser that doesn't show a difference between whitespace and other changes?
- francislavoie 3y agoIt's impossible to turn off line length rules. You can only change the width, which means if you set it to a big number it will aggressively unwrap code you want to keep wrapped sensibly. Awful and unacceptable.