|
|
|
|
|
by Simucal
4559 days ago
|
|
I set this up for my team using Uncrustify and a Git pre-commit hook. It will reject any commit which has files that don't adhere to our Uncrustify config file. If it rejects the commit it gives you a command to execute that will automatically fix your style issues. |
|
If the diff is full of additional formatting/stylistic changes, it can make it a lot harder to cut through the noise and get down to the heart of the change.
I'm not saying you should never clean up old code/files, however when I see that needs to be done, I try to do it in a separate commit that I make after the "real" change. The log message for that change is something like "Formatting", or "Cleanup, no functional changes".