On 13 Sep 2023, at 16:25, Volker Hilsheimer via Development <development@qt-project.org> wrote:
I find the input from clang-format’s sometimes helpful, sometimes annoying. And the source of the annoyance is not that clang-format points out things that I could have formatted differently, but that our pre-commit hook returns with a non-zero exit code if clang-format produces a diff, thus blocking the commit. +1 - the only objection to clang-format I find hard to rebut is this behavior, in particular in cases where said style violation is in pre-existing code that isn't part of the change in question. FWIW each single module (and sub-directory of modules) can sport their own clang-format config. The top-level one (i.e. qt5.git/_clang-format) then works as a fall-back for those that don't have one, in a qt5.git checkout. So if a proliferation of clang-format files occur, I'd still vote in favor of keeping the one in qt5.git either way, such that contributors in modules that don't want to keep track of possible style changes locally can still shift some whitespace around programmatically if they so please. Volker //! Paul
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development