3 ms·
This is awesome, but one request: can you please extend it into a real (ie, AST based) diffing tool? Current diffing tools all compare the text (which is basica
by nailer 10y ago
This is awesome, but one request: can you please extend it into a real (ie, AST based) diffing tool? Current diffing tools all compare the text (which is basically an input format) rather than the AST, and hence end up focusing on formatting rather than actual changes.
- estebank 10y agoYou could hack a diffing tool that reformats both the before and after and shows the diff of the generated text. This would not catch changes like --val x = [1] ++var x = [ ++ 1, ++]; as expected, while it would give you a slightly more verbose diff if the change was --val x = [short(), short()]; ++val x = [ ++ a_really_long_name_that_pushes_the_line_length(), ++ a_really_long_name_that_pushes_the_line_length(), ++];
- masterj 10y agoIf you auto-format as a commit hook then all of the changes you see will be AST-based, and you can ignore the style.