* [PATCH] clang-format: set continuation indentation to 2
@ 2020-05-15 6:50 Giuliano Procida
2020-05-15 8:09 ` Matthias Maennich
2020-05-18 8:48 ` Dodji Seketeli
0 siblings, 2 replies; 3+ messages in thread
From: Giuliano Procida @ 2020-05-15 6:50 UTC (permalink / raw)
To: libabigail, maennich; +Cc: dodji, kernel-team, gprocida
This is a further tweak to the clang-format rules, bringing them
(on average) closer to the existing corpus of code.
The existing code mostly uses an indentaton of 2 spaces, rather than
4, for expressions broken across lines. There are exceptions such as
conditional expressions that are initialisers but clang-format's
indentation may be preferable to emacs' zero indentation here.
* .clang-format: Set ContinuationIndentWidth to 2.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
.clang-format | 1 +
1 file changed, 1 insertion(+)
diff --git a/.clang-format b/.clang-format
index f3a039c6..1dd679d4 100644
--- a/.clang-format
+++ b/.clang-format
@@ -5,6 +5,7 @@ AlwaysBreakAfterReturnType: All
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
+ContinuationIndentWidth: 2
BinPackParameters: false
BreakStringLiterals: false
PointerAlignment: Left
--
2.26.2.761.g0e0b3e54be-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clang-format: set continuation indentation to 2
2020-05-15 6:50 [PATCH] clang-format: set continuation indentation to 2 Giuliano Procida
@ 2020-05-15 8:09 ` Matthias Maennich
2020-05-18 8:48 ` Dodji Seketeli
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Maennich @ 2020-05-15 8:09 UTC (permalink / raw)
To: Giuliano Procida; +Cc: libabigail, dodji, kernel-team
On Fri, May 15, 2020 at 07:50:12AM +0100, Giuliano Procida wrote:
>This is a further tweak to the clang-format rules, bringing them
>(on average) closer to the existing corpus of code.
>
>The existing code mostly uses an indentaton of 2 spaces, rather than
>4, for expressions broken across lines. There are exceptions such as
>conditional expressions that are initialisers but clang-format's
>indentation may be preferable to emacs' zero indentation here.
>
> * .clang-format: Set ContinuationIndentWidth to 2.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>---
> .clang-format | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/.clang-format b/.clang-format
>index f3a039c6..1dd679d4 100644
>--- a/.clang-format
>+++ b/.clang-format
>@@ -5,6 +5,7 @@ AlwaysBreakAfterReturnType: All
> BreakConstructorInitializers: BeforeColon
> ConstructorInitializerAllOnOneLineOrOnePerLine: true
> ConstructorInitializerIndentWidth: 2
>+ContinuationIndentWidth: 2
> BinPackParameters: false
> BreakStringLiterals: false
> PointerAlignment: Left
>--
>2.26.2.761.g0e0b3e54be-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clang-format: set continuation indentation to 2
2020-05-15 6:50 [PATCH] clang-format: set continuation indentation to 2 Giuliano Procida
2020-05-15 8:09 ` Matthias Maennich
@ 2020-05-18 8:48 ` Dodji Seketeli
1 sibling, 0 replies; 3+ messages in thread
From: Dodji Seketeli @ 2020-05-18 8:48 UTC (permalink / raw)
To: Giuliano Procida; +Cc: libabigail, maennich, kernel-team
Giuliano Procida <gprocida@google.com> a écrit:
> This is a further tweak to the clang-format rules, bringing them
> (on average) closer to the existing corpus of code.
>
> The existing code mostly uses an indentaton of 2 spaces, rather than
> 4, for expressions broken across lines. There are exceptions such as
> conditional expressions that are initialisers but clang-format's
> indentation may be preferable to emacs' zero indentation here.
>
> * .clang-format: Set ContinuationIndentWidth to 2.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>
Acked-By: Dodji Seketeli <dodji@redhat.com>
Applied to master, thanks!
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-18 8:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 6:50 [PATCH] clang-format: set continuation indentation to 2 Giuliano Procida
2020-05-15 8:09 ` Matthias Maennich
2020-05-18 8:48 ` Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).