RFC: Running clang-format across all Plasma (and more?) repos
Allan Sandfeld Jensen
kde at carewolf.com
Fri Jul 12 23:01:34 BST 2019
On Donnerstag, 11. Juli 2019 16:18:08 CEST 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?
>
I would argue against it. clang-format is extremely primitive and stupid, it
can't implement KDE or Qt coding styles or anything close to it, and will just
make mess of manually indented code. You can could try to make a style that
rougly appriximates KDE coding style (as good as clang-format can get with its
primitive configuration), and then offer that for newbies so they follow at
least basic rules, but a total reformatting of all code would be an objective
downgrade of source code readablity and requires simplifying KDE coding styles
to something that clang-format supports.
'Allan
More information about the Plasma-devel
mailing list