From: Kirill Yukhin <kyukhin@tarantool.org> To: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH 0/5] Add clang format Date: Fri, 30 Oct 2020 14:43:47 +0300 [thread overview] Message-ID: <cover.1604057827.git.kyukhin@tarantool.org> (raw) Hello, This patchset introduces Clang formatter rules and applies them to the src/box/ sources (except for sql/). Diff consists of about 6.000 insertions which is about 5% of code base. Is also adds new rules to cmake: - make format-set, to apply Clang formatter - make format-check, to check if current format is OK Finally it adds a new job to gitlab CI's first stage which fails of Clang format is not OK. I've prepared corresponding changes for other release branches and intend to commit all changes together. Issue https://github.com/tarantool/tarantool/issues/4297 Branch https://github.com/tarantool/tarantool/tree/kyukhin/gh-4297-clang-format-master CI https://gitlab.com/tarantool/tarantool/-/pipelines/209689550 Kirill Yukhin (5): clang-format: guard various declarations Add .clang-format for src/box/ build: add clang-format rules gitlab-ci: add code style check Apply Clang formatter .gitlab-ci.yml | 7 + .travis.mk | 6 +- CMakeLists.txt | 38 +- src/box/.clang-format | 125 ++++ src/box/alter.cc | 1494 +++++++++++++++++++++-------------------- src/box/applier.cc | 140 ++-- src/box/applier.h | 36 +- src/box/authentication.cc | 8 +- src/box/authentication.h | 1 - src/box/bind.c | 13 +- src/box/bind.h | 3 +- src/box/blackhole.c | 15 +- src/box/box.cc | 192 +++--- src/box/box.h | 98 ++- src/box/call.c | 9 +- src/box/checkpoint_schedule.c | 4 +- src/box/checkpoint_schedule.h | 4 +- src/box/ck_constraint.c | 17 +- src/box/ck_constraint.h | 4 +- src/box/coll_id.c | 2 +- src/box/coll_id_cache.c | 9 +- src/box/coll_id_def.c | 17 +- src/box/column_mask.h | 8 +- src/box/constraint_id.c | 8 +- src/box/engine.c | 56 +- src/box/engine.h | 84 ++- src/box/errcode.c | 11 +- src/box/errcode.h | 4 +- src/box/error.cc | 78 ++- src/box/error.h | 86 +-- src/box/execute.c | 98 ++- src/box/field_def.c | 28 +- src/box/field_def.h | 2 +- src/box/field_map.c | 13 +- src/box/field_map.h | 15 +- src/box/fk_constraint.h | 5 +- src/box/func.c | 58 +- src/box/func.h | 3 +- src/box/func_def.c | 4 +- src/box/func_def.h | 4 +- src/box/gc.c | 38 +- src/box/ibuf.c | 3 +- src/box/identifier.c | 6 +- src/box/index.cc | 118 ++-- src/box/index.h | 135 ++-- src/box/index_def.c | 47 +- src/box/index_def.h | 22 +- src/box/iproto.cc | 213 +++--- src/box/iproto_constants.c | 4 + src/box/iproto_constants.h | 26 +- src/box/iterator_type.c | 3 +- src/box/iterator_type.h | 29 +- src/box/journal.c | 6 +- src/box/journal.h | 23 +- src/box/key_def.c | 130 ++-- src/box/key_def.h | 62 +- src/box/key_list.c | 8 +- src/box/key_list.h | 4 +- src/box/lua/call.c | 104 ++- src/box/lua/call.h | 8 +- src/box/lua/cfg.cc | 88 ++- src/box/lua/console.c | 112 +-- src/box/lua/ctl.c | 14 +- src/box/lua/error.cc | 35 +- src/box/lua/execute.c | 55 +- src/box/lua/index.c | 75 ++- src/box/lua/info.c | 85 +-- src/box/lua/init.c | 108 ++- src/box/lua/key_def.c | 51 +- src/box/lua/merger.c | 181 ++--- src/box/lua/misc.cc | 37 +- src/box/lua/net_box.c | 97 +-- src/box/lua/sequence.c | 12 +- src/box/lua/serialize_lua.c | 197 +++--- src/box/lua/session.c | 68 +- src/box/lua/slab.c | 17 +- src/box/lua/slab.h | 3 +- src/box/lua/space.cc | 80 +-- src/box/lua/stat.c | 36 +- src/box/lua/stat.h | 3 +- src/box/lua/tuple.c | 98 +-- src/box/lua/xlog.c | 38 +- src/box/memtx_bitset.c | 72 +- src/box/memtx_engine.c | 101 ++- src/box/memtx_engine.h | 18 +- src/box/memtx_hash.c | 143 ++-- src/box/memtx_rtree.c | 58 +- src/box/memtx_space.c | 178 ++--- src/box/memtx_space.h | 4 +- src/box/memtx_tree.cc | 377 ++++++----- src/box/memtx_tx.c | 141 ++-- src/box/memtx_tx.h | 4 +- src/box/merger.c | 9 +- src/box/mp_error.cc | 80 +-- src/box/msgpack.c | 4 +- src/box/opt_def.c | 10 +- src/box/opt_def.h | 72 +- src/box/port.h | 6 +- src/box/raft.c | 31 +- src/box/recovery.cc | 40 +- src/box/recovery.h | 2 +- src/box/relay.cc | 71 +- src/box/relay.h | 2 +- src/box/replication.cc | 121 ++-- src/box/replication.h | 11 +- src/box/request.c | 15 +- src/box/schema.cc | 159 +++-- src/box/schema.h | 17 +- src/box/schema_def.c | 6 +- src/box/schema_def.h | 6 +- src/box/sequence.c | 50 +- src/box/session.cc | 38 +- src/box/session.h | 9 +- src/box/session_settings.c | 34 +- src/box/space.c | 80 +-- src/box/space.h | 87 ++- src/box/space_def.c | 30 +- src/box/space_def.h | 16 +- src/box/sysview.c | 44 +- src/box/tuple.c | 99 +-- src/box/tuple.h | 32 +- src/box/tuple_bloom.c | 27 +- src/box/tuple_bloom.h | 5 +- src/box/tuple_compare.cc | 401 ++++++----- src/box/tuple_convert.c | 28 +- src/box/tuple_dictionary.c | 37 +- src/box/tuple_extract_key.cc | 82 ++- src/box/tuple_format.c | 189 +++--- src/box/tuple_format.h | 34 +- src/box/tuple_hash.cc | 140 ++-- src/box/txn.c | 66 +- src/box/txn_limbo.c | 34 +- src/box/user.cc | 101 ++- src/box/user.h | 5 +- src/box/user_def.c | 23 +- src/box/user_def.h | 6 +- src/box/vclock.c | 151 ++--- src/box/vclock.h | 24 +- src/box/vinyl.c | 363 +++++----- src/box/vinyl.h | 12 +- src/box/vy_cache.c | 60 +- src/box/vy_cache.h | 10 +- src/box/vy_history.c | 8 +- src/box/vy_history.h | 7 +- src/box/vy_log.c | 213 +++--- src/box/vy_log.h | 52 +- src/box/vy_lsm.c | 157 +++-- src/box/vy_lsm.h | 18 +- src/box/vy_mem.c | 92 +-- src/box/vy_mem.h | 13 +- src/box/vy_point_lookup.c | 42 +- src/box/vy_point_lookup.h | 4 +- src/box/vy_quota.c | 13 +- src/box/vy_quota.h | 7 +- src/box/vy_range.c | 19 +- src/box/vy_range.h | 4 +- src/box/vy_read_iterator.c | 132 ++-- src/box/vy_read_set.c | 11 +- src/box/vy_regulator.c | 41 +- src/box/vy_regulator.h | 7 +- src/box/vy_run.c | 367 +++++----- src/box/vy_run.h | 48 +- src/box/vy_scheduler.c | 179 ++--- src/box/vy_scheduler.h | 6 +- src/box/vy_stmt.c | 114 ++-- src/box/vy_stmt.h | 85 +-- src/box/vy_stmt_stream.h | 10 +- src/box/vy_tx.c | 127 ++-- src/box/vy_tx.h | 21 +- src/box/vy_upsert.c | 17 +- src/box/vy_upsert.h | 4 +- src/box/vy_write_iterator.c | 64 +- src/box/vy_write_iterator.h | 11 +- src/box/wal.c | 183 +++-- src/box/wal.h | 8 +- src/box/xlog.c | 288 ++++---- src/box/xlog.h | 36 +- src/box/xrow.c | 347 +++++----- src/box/xrow.h | 44 +- src/box/xrow_io.cc | 16 +- src/box/xrow_io.h | 1 - src/box/xrow_update.c | 11 +- src/box/xrow_update.h | 5 +- src/box/xrow_update_array.c | 66 +- src/box/xrow_update_bar.c | 75 +-- src/box/xrow_update_field.c | 106 +-- src/box/xrow_update_field.h | 132 ++-- src/box/xrow_update_map.c | 74 +- src/box/xrow_update_route.c | 45 +- 189 files changed, 6445 insertions(+), 6246 deletions(-) create mode 100644 src/box/.clang-format -- 1.8.3.1
next reply other threads:[~2020-10-30 11:44 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-30 11:43 Kirill Yukhin [this message] 2020-10-30 11:43 ` [Tarantool-patches] [PATCH 1/5] clang-format: guard various declarations Kirill Yukhin 2020-11-08 15:09 ` Vladislav Shpilevoy 2020-10-30 11:43 ` [Tarantool-patches] [PATCH 2/5] Add .clang-format for src/box/ Kirill Yukhin 2020-10-30 11:43 ` [Tarantool-patches] [PATCH 3/5] build: add clang-format rules Kirill Yukhin 2020-11-08 15:09 ` Vladislav Shpilevoy 2020-10-30 11:43 ` [Tarantool-patches] [PATCH 4/5] gitlab-ci: add code style check Kirill Yukhin 2020-10-30 11:43 ` [Tarantool-patches] [PATCH 5/5] Apply Clang formatter Kirill Yukhin 2020-10-30 13:42 ` Konstantin Osipov 2020-10-30 23:04 ` Vladislav Shpilevoy 2020-11-01 21:40 ` Konstantin Osipov 2020-11-02 7:35 ` Kirill Yukhin 2020-11-02 21:05 ` Vladislav Shpilevoy 2020-11-10 14:16 ` Kirill Yukhin 2020-11-10 20:38 ` Vladislav Shpilevoy 2020-11-11 8:23 ` Kirill Yukhin 2020-11-08 15:11 ` Vladislav Shpilevoy
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=cover.1604057827.git.kyukhin@tarantool.org \ --to=kyukhin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 0/5] Add clang format' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox