public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
	 maennich@google.com, teguiani@android.com
Subject: [PATCH 1/6] Tweak clang-format
Date: Fri, 11 Jun 2021 16:33:14 +0100	[thread overview]
Message-ID: <20210611153319.778996-2-gprocida@google.com> (raw)
In-Reply-To: <20210611153319.778996-1-gprocida@google.com>

The BTF / SCC code is being migrated out of Google source control into
AOSP. This comes with the opportunity to migrate the style to be
closer libabigail's.

In the first instance it makes sense to just reformat it with
clang-format. I've updated this as follows.

AlignConsecutiveDeclarations: false - as this is closer on average to
libgabigail code and looks nicer for the new code anyway

AllowShort*: (true) - these in theory should make things closer to
libabigail style but in practice don't appear make any difference

Cpp11BracedListStyle: true - this seems to improve some initialiser
syntax

BinPackArguments: false - we already turn this off for parameters

SpaceAfterCStyleCast: true - seems to be the libabigail style

	* .clang-format: Various tweaks for new BTF code.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 .clang-format | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.clang-format b/.clang-format
index 1b422dfb..d09d739a 100644
--- a/.clang-format
+++ b/.clang-format
@@ -2,17 +2,24 @@
 ---
 BasedOnStyle: GNU
 Standard: c++11
-AlignConsecutiveDeclarations: true
+AlignConsecutiveDeclarations: false
+AllowShortBlocksOnASingleLine: Always
+AllowShortEnumsOnASingleLine: true
+AllowShortFunctionsOnASingleLine: All
+AllowShortLambdasOnASingleLine: All
 AlwaysBreakAfterReturnType: All
 BreakConstructorInitializers: BeforeColon
 ConstructorInitializerAllOnOneLineOrOnePerLine: true
 ConstructorInitializerIndentWidth: 2
+Cpp11BracedListStyle: true
 IndentWidth: 2
 AlignAfterOpenBracket: Align
+BinPackArguments: false
 BinPackParameters: false
 BreakStringLiterals: false
 PointerAlignment: Left
 SortUsingDeclarations: false
+SpaceAfterCStyleCast: true
 SpaceBeforeParens: ControlStatements
 TabWidth: 8
 UseTab: Always
-- 
2.32.0.272.g935e593368-goog


  reply	other threads:[~2021-06-11 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 15:33 [PATCH 0/6] BTF ABI Giuliano Procida
2021-06-11 15:33 ` Giuliano Procida [this message]
2021-06-11 15:33 ` [PATCH 2/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-11 15:33 ` [PATCH 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-11 15:33 ` [PATCH 4/6] BTF: add core functionality Giuliano Procida
2021-06-11 15:33 ` [PATCH 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-11 15:33 ` [PATCH 6/6] BTF: clang-format all the new source files Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 0/6] BTF ABI Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 1/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 2/6] Tweak clang-format Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 4/6] BTF: add core functionality Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 6/6] BTF: clang-format all the new source files Giuliano Procida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611153319.778996-2-gprocida@google.com \
    --to=gprocida@google.com \
    --cc=dodji@seketeli.org \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    --cc=teguiani@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).