D24283: Add clang format file

2019-10-14 Thread Christoph Cullmann
cullmann added a comment.


  There will anyways be one "big" change in the history, but normally git will 
be able to handle that well by ignoring space changes for blame or diff.
  I don't think without the aligning the change will be much smaller.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-14 Thread Vlad Zahorodnii
zzag added a comment.


  In D24283#545620 , @cullmann wrote:
  
  > For the alignment of comments, I am not sure, it makes the stuff a lot more 
readable in many cases and after the initial re-format you don't have a lot of 
jitter normally.
  
  
  As I said my concern is that aligning trailing comments (as well consecutive 
assignments) will mess git history up. Unfortunately, there's no right and 
wrong, we have to look at such things case by case.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-12 Thread Christoph Cullmann
cullmann added inline comments.

INLINE COMMENTS

> zzag wrote in .clang-format:83
> s/coding/coding style/

Fixed that in D24568 

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-12 Thread David Edmundson
davidedmundson abandoned this revision.
davidedmundson added a comment.


  Lets do all this discussion on D24568 
  
  However, as this CC's the plasma team I would urge people again to follow up 
on that thread as I do intend on running it across all plasma repos.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-11 Thread Christoph Cullmann
cullmann added a comment.


  This is just a base file for discussion.
  Stuff like the mentioned case indentation can be adjusted to be frameworks 
conform.
  For the alignment of comments, I am not sure, it makes the stuff a lot more 
readable in many cases and after the initial re-format you don't have a lot of 
jitter normally.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-11 Thread Vlad Zahorodnii
zzag added inline comments.

INLINE COMMENTS

> zzag wrote in .clang-format:83
> The Frameworks coding says not to indent case lables.

s/coding/coding style/

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-11 Thread Vlad Zahorodnii
zzag added inline comments.

INLINE COMMENTS

> .clang-format:55-56
> +
> +# align trailing comments
> +AlignTrailingComments: true
> +

I'd object to aligning trailing comments because a single line change may 
affect many other unrelated lines.

However, if this .clang-format file serves just as a sample and projects are 
allowed to tweak it, then it's fine.

> .clang-format:83
> +# indent case labels one level
> +IndentCaseLabels: true
> +

The Frameworks coding says not to indent case lables.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: zzag, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-10-11 Thread Christoph Cullmann
cullmann added a comment.


  See D24568  for the draft of an ECM 
module that applies the Kate/KTextEditor/Artikulate style.
  Is the same file as here, with sorting of includes, but with column limit.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24283

To: davidedmundson
Cc: cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24283: Add clang format file

2019-09-28 Thread David Edmundson
davidedmundson created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
davidedmundson requested review of this revision.

REVISION SUMMARY
  Kate have just clang-formatted all their code, a few
  other proejcts have too (see T11214 ). I 
think we can move 
  forward.
  
  We need to bikeshed on the exact formatting.
  
  We had a version proposed, but being similar to Kate makes
  sense too.
  
  This is the same file as Kate without the column limit 
  and with sorted includes which KWin people wanted.
  
  If I upload a big diff to phab to see the result the web UI
  will have a meltdown.
  
  Instead download this patch (for any repo) and run
  find . -name \*.h -print -o -name \*.cpp -print | xargs clang-format -i

REPOSITORY
  R120 Plasma Workspace

BRANCH
  clang_format

REVISION DETAIL
  https://phabricator.kde.org/D24283

AFFECTED FILES
  .clang-format

To: davidedmundson
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart