From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A98ED469719 for ; Sun, 8 Nov 2020 18:09:10 +0300 (MSK) From: Vladislav Shpilevoy References: <9b64f1b480d15fa627882544ff2a8758f914ecc3.1604057827.git.kyukhin@tarantool.org> Message-ID: <7d9a49cf-c8f8-6e31-bc77-fe231d30658d@tarantool.org> Date: Sun, 8 Nov 2020 16:09:08 +0100 MIME-Version: 1.0 In-Reply-To: <9b64f1b480d15fa627882544ff2a8758f914ecc3.1604057827.git.kyukhin@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/5] clang-format: guard various declarations List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin , tarantool-patches@dev.tarantool.org Hi! See 2 comments below. On 30.10.2020 12:43, Kirill Yukhin wrote: > Disable clang-formatter for: > - iproto_constants.c > - constants in vy_log.c > - key comparator definitions. > - for field_def's types compatibility > --- > src/box/errcode.h | 4 +++- > src/box/field_def.c | 2 ++ > src/box/iproto_constants.c | 4 ++++ > src/box/tuple_compare.cc | 4 ++++ > src/box/vy_log.c | 2 ++ > 5 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/src/box/errcode.h b/src/box/errcode.h > index e6957d6..244bda1 100644 > --- a/src/box/errcode.h > +++ b/src/box/errcode.h > @@ -51,7 +51,8 @@ struct errcode_record { > * Please don't forget to do it! > */ > > -#define ERROR_CODES(_) \ > +/* clang-format off */ > +#define ERROR_CODES(_) \ 1. Why did you change the second line? It is still misaligned, and this whole list of error codes does not align \ anyway. > /* 0 */_(ER_UNKNOWN, "Unknown error") \ > /* 1 */_(ER_ILLEGAL_PARAMS, "Illegal parameters, %s") \ > /* 2 */_(ER_MEMORY_ISSUE, "Failed to allocate %u bytes in %s for %s") \ > @@ -273,6 +274,7 @@ struct errcode_record { > /*218 */_(ER_TUPLE_METADATA_IS_TOO_BIG, "Can't create tuple: metadata size %u is too big") \ > /*219 */_(ER_XLOG_GAP, "%s") \ > /*220 */_(ER_TOO_EARLY_SUBSCRIBE, "Can't subscribe non-anonymous replica %s until join is done") \ > +/* clang-format on */ > diff --git a/src/box/iproto_constants.c b/src/box/iproto_constants.c > index 029d988..af3ab60 100644 > --- a/src/box/iproto_constants.c > +++ b/src/box/iproto_constants.c > @@ -30,6 +30,8 @@ > */ > #include "iproto_constants.h" > > +/* clang-format off */ > + 2. What is the rule by which you decide when need an empty line after format comment and when not? > const unsigned char iproto_key_type[IPROTO_KEY_MAX] = > { > /* {{{ header */ > @@ -226,3 +228,5 @@ const char *vy_row_index_key_strs[VY_ROW_INDEX_KEY_MAX] = { > NULL, > "row index", > }; > + > +/* clang-format on */