[Qbs] [RFC] Add a clang-format config file to qbs repo

resurrection at centrum.cz resurrection at centrum.cz
Mon Jul 8 13:58:23 CEST 2019

I cannot recommend clang-format enough. I can hardly imagine working without it.
> Od: "Christian Gagneraud" <chgans at gmail.com>
> Komu: "qbs" <qbs at qt-project.org>
> Datum: 08.07.2019 11:39
> Předmět: [Qbs] [RFC] Add a clang-format config file to qbs repo
Hi there,
 I would like to propose to add a clang-format config file to qbs repo.
 I don't want to go in depth about which coding style we should use, so
 i propose we simple copy the one used by QtCreator developers. :)
 The rational for using clang-format is that it simplifies code review,
 no need to waste time for coding style any more (line too long, white
 space in the wrong place, ...). Any modern IDE will pick it up
 automatically and format your changes according to it.
 If you're interested, it is as well possible to add client side hooks
 that will automatically reformat *only the edited part of files* of
 the commit.
 Before you say Ya/Na, i would like to give some pros and cons (again
 won't go into details):
 - cons: It's rigid, if the config file is "wrong", doesn't understand
 edge cases, is not contextual enough, ... then you just have to deal
 with it (read: accept its rules).
 - pros: say bye-bye to the need to comment (or address comment) about
 indentation, spaces, bracket placement, ... and the need to manually
 check if you do the right thing or not. Let SW do the hard job.
 We've switched to that at work a year or 2 ago, and since then,
 reviews are more focus, it made a huge difference.
 Let me vote first, :)
 Any comment, objection?
 Qbs mailing list
 Qbs at qt-project.org
 https://lists.qt-project.org/listinfo/qbs <https://lists.qt-project.org/listinfo/qbs>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20190708/87b11581/attachment-0001.html>

More information about the Qbs mailing list