3 ms·
Is this tool obsoleted by autoformatters?
by iwwr 5y ago
Is this tool obsoleted by autoformatters?
- codetrotter 5y agoNot unless you you have a git hook to ensure that every commit is run through the auto formatter, and you additionally ensure that everyone that commits to the repositories you work on have this hook installed too. And even then, many people still interact with repositories that are outside of their power to enforce such rules upon.
- polynomial 5y agosorry for the dumb question but why can't you use GH Actions for this? (Instead of making sure all committers have the hook installed.)
- sahkopoyta 5y ago>git hook to ensure that every commit is run through the auto formatter, and you additionally ensure that everyone that commits to the repositories you work on have this hook installed too Eg. with node project this is a trivial task with tools like Husky in place
- kevincox 5y agoNot necessarily. You could also run the "unformatted" files through the formatter before doing the diff.
- craftkiller 5y agoIt could be useful if it was modified to become a great merge tool. I've been using kdiff3 as my git mergetool and its always splits my code up at the worst spots because it does not understand python.
- fierro 5y agono, because the bigger win isn't ingoring whitespacing. It's ignore refactoring changes like renaming functions
- affyboi 5y agoNot if they do any sort of alignment (like structs in golang)
- erik_seaberg 5y agoThis tool works with the author’s intended layout, a big advantage over autoformatters which destroy and replace it poorly (it’s probably an AI-complete problem).