Don't run the auto code formatter on the whole file but only on those parts you edit. The pro of this approach is that we don't clutter history with pure formatting changes, the downside is that sometimes the formatting isn't 100% consistent.