[Development] clang-format
Kari Oikarinen
kari.oikarinen at qt.io
Mon Jun 18 11:23:53 CEST 2018
On 18.06.2018 12:04, Frederik Gladhorn wrote:
<snip>
Other parts sound good, so I'll just touch on the big question.
> And then there is the big question when we run it once over the entire
> codebase.
I'd hesitate to ever run it over the entire codebase.
* It will ruin plain git blame, since so much will point to that particular
commit. Yes, you can use `git blame -w` to avoid whitespace changes,
but that
does not catch rewrapped lines.
* Open changes would need to be rebased on top of it. When would be a
good point
in time with few open changes?
* Which branch do you run it in? If an early one, there's many merges to
do. If
a late one, all the subsequent merges are tricky.
It is quite a bit of pain while the benefit isn't that big. Actively
worked on
areas would shape up incrementally anyway and the other areas are not
read that
much, so the damage of inconsistent formatting is limited.
For the above reasons I'd lean towards not running it globally and just
using it
on new changes.
--
Kari
More information about the Development
mailing list