[tarantool-patches] Re: [PATCH 2/2] sql: statistics removal after dropping an index

n.pettik korablev at tarantool.org
Sat Apr 14 11:13:24 MSK 2018


> On 14 Apr 2018, at 07:29, Hollow111 <hollow653 at gmail.com> wrote:
> 
> Hello. I'd like to ask about 'one kind of corrections”.

> 
> Arguments which you carry to the next line, should start right below previous:
> 
> void f(x int, ….
>           y char, ….
>           z double …);
> 
> I couldnt find this in  "C style guide" (https://tarantool.io/en/doc/2.0/dev_guide/c_style_guide.html <https://tarantool.io/en/doc/2.0/dev_guide/c_style_guide.html>)
> Moreover according to this guide:
> "Outside of comments, documentation and except in Kconfig, spaces are never used for indentation...".
> Which means we're supposed to violate this rule

In fact, they are used. Probably, we should update and clarify this point in docs.
You use tabs as much as possible. To precisely align argument lists, you have
to use spaces:

return_value very_long_function_name_bla_bla_bla(int first_argument,
						 int second_argument)

To make ’second_argument’ be under first, you should use 8 tabs + 1 space.
Overall, you can inspect other source files from box/ to understand how
source files should be formatted. Also, I advise you to make spaces and tabs visible.
For instance, see how it was done in box/space.c 106 : space_create()

> in case first argument is positioned not on the same range 
> from left corner of screen as any amount of 8-character tabs. 
> Maybe I'm wrong at smth but I'd like to have an explanation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180414/4e0fe30c/attachment.html>


More information about the Tarantool-patches mailing list