RFC: Running clang-format across all Plasma (and more?) repos
David Jarvie
djarvie at kde.org
Fri Jul 12 14:02:34 BST 2019
On Thursday 11 Jul 2019 14:18:08 David Edmundson wrote:
> One topic discussed at the recent Plasma sprint was that we should run
> a code formatting tool (clang-format) over all our repos to ease all
> future review comments about whitespace.
>
> All new contributions simply have to run the same tool and we get
> consistent code without having to comment on every minor thing in a
> review individually.
>
> I've written up a wall of text outlining steps, challenges etc.
> https://phabricator.kde.org/T11214
>
> Does anyone have any thoughts / objections?
Presumably this would impose a common coding style throughout all KDE
repositories? Or would each project be able to specify its own clang-format
configuration? In past discussions about KDE coding style, it was accepted that
while Frameworks and PIM libraries would adopt a common style, Applications
would be left to decide for themselves.
There may be more benefits from what you propose for larger projects, because
of the larger number of contributors and larger volume of reviews. But for
smaller ones with one or two contributors and few reviews, it bring few
benefits.
It should be for individual projects to decide whether automatic code
formatting would be desirable or useful to them. This will allow projects to
continue to use their own coding styles where they wish, and allow for hand-
crafted formatting to be left intact where this is desired.
--
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
More information about the Plasma-devel
mailing list