[Development] Proposal: (re)move qt5.git/_clang-format

Paul Wicking Paul.Wicking at qt.io
Wed Sep 13 18:28:08 CEST 2023



On 13 Sep 2023, at 16:25, Volker Hilsheimer via Development <development at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230913/84754c3d/attachment.htm>


More information about the Development mailing list