[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: RFC: Running clang-format across all Plasma (and more?) repos
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2019-07-12 22:01:34
Message-ID: 11338132.O9o76ZdvQC () twilight
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic