Comment by codetrotter
4 years ago
Not 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.
>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
Not necessarily. You could also run the "unformatted" files through the formatter before doing the diff.
sorry for the dumb question but why can't you use GH Actions for this? (Instead of making sure all committers have the hook installed.)