[Qbs] [RFC] Add a clang-format config file to qbs repo
abbapoh at gmail.com
Mon Jul 8 11:59:00 CEST 2019
Never used clang-format before, but +1.
I don't want waste my time searching for those long lines too=)
> 8 июля 2019 г., в 11:39, Christian Gagneraud <chgans at gmail.com> написал(а):
> 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
More information about the Qbs