|
From: Mark W. <ma...@kl...> - 2023-04-22 17:45:20
|
Hi Nick, On Fri, Apr 21, 2023 at 09:06:06AM +1000, Nicholas Nethercote wrote: > On Fri, 21 Apr 2023 at 07:06, Bart Van Assche <bva...@ac...> wrote: > > > No matter how > > much time is spent on tuning the .clang-format file, there will always > > be code for which the formatting is made worse by clang-format than the > > existing code. > > > > It's true that there are rare cases where an auto-formatter does a bad job, > such as code in tabular form. > > Fortunately there's an easy workaround for that too: you just put `// > clang-format off` at the start of the block and `// clang-format on` at the > end of the block. But why do you want to reformat all the exiting code? Isn't it enough if people have easy tools to format new hunks? I am happy if we encourage people to use code formatters for new/changed code. But forcing a reformat of the whole project on people seems like a bad idea. I think Paul's recent accident with clang-format shows why it is not a good idea to try to reformat any existing code. It just introduces huge arbitrary changes. Cheers, Mark |