[Tarantool-patches] [PATCH] app/argparse: expect no value for a boolean option

Alexander Turenko alexander.turenko at tarantool.org
Wed Nov 13 00:03:19 MSK 2019


> >>> +                -- Don't consume a value after a 'boolean' or
> >>> +                -- 'boolean+' argument.
> >>> +                if lookup[command] ~= 'boolean' and
> >>> +                        lookup[command] ~= 'boolean+' then
> >>
> >> 2. Something is wrong with the indentation.
> > 
> > Let's consider three variants of splitting long if conditions:
> > 
> >  | if long_cond1 or
> >  |    long_cond2 then
> >  |     <...>
> >  | end
> > 
> >  | if long_cond1 or
> >  |     long_cond2 then
> >  |     <...>
> >  | end
> > 
> >  | if long_cond1 or
> >  |         long_cond2 then
> >  |     <...>
> >  | end
> > 
> > As I see the first and the second variants are used across tarantool's
> > built-in Lua code. You are right, third one, which I personally prefer,
> > is not used within the project.
> 
> There is no options. The first is the only standard in our code. If the
> second one is used somewhere, then it is incorrect, or is a third-party
> library with own code style.

I see no mentions about this (at least there is nothing about this in
our Lua Style Guide on the website) as well as I see no dominant style
across our Lua code.

What is the source of your information?


More information about the Tarantool-patches mailing list