[RFC] Adding support for clang-format making further code modifying changes

I would expect a formatting tool that introduces bugs to go out of favour extremely quickly and probably irreversibly once that was established to be by design.

Header reordering feels like an edge case. Most code tries to keep them order independent anyway. Clang-format doesn’t reorder between blocks of includes that are separated by an extra newline so there is an easy escape.

I claim the current on by default for header order is the wrong default. I use the llvm format guide (without reading it) so had not realised this was the case. It probably means some non-zero number of developers will have tried clang-format, had it break their code, go back to what they had before.

I don’t mind if the tool can change the semantics of code provided it does not do so unless asked.

Thanks for the RFC! Sorry to take the opposite position to what you’d prefer.

I would expect a formatting tool that introduces bugs to go out of favour extremely quickly and probably irreversibly once that was established to be by design.

Header reordering feels like an edge case. Most code tries to keep them order independent anyway. Clang-format doesn't reorder between blocks of includes that are separated by an extra newline so there is an easy escape.

That is only true, if the IncludeBlocks option is not set to Regroup (which I use), so there is another precedent of opt-in to potentially break something.