lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 14, 2017 at 2:45 PM, David Goehrig <dave@nexttolast.com> wrote:
> On Wed, Jun 14, 2017 at 3:31 PM, Soni L. <fakedme@gmail.com> wrote:
>>
>>
>> <tab><tab>local function uh(oops, something, tells, me, this, is, a,
>> giant,
>> <tab><tab><tab><tab><tab>fail)
>> <tab><tab>end
>>
>> Have fun getting that aligned.
>
>
> My scripts won't align that, and they would reject that code for a number of
> reasons:
>
> 1.) too many layers of indentation
> 2.) too many parameters to  the function
> 3.) function is a no-op / has no lines of code
> etc.
>
> Granted you'd fail code review on my team if you submitted something that
> looked like that :)
>
> Dave

Mine would end up aligning it as:

\t\tlocal function uh(
\t\t\toops,
\t\t\tsomething,
\t\t\ttells,
\t\t\tme,
\t\t\tthis,
\t\t\tis,
\t\t\ta,
\t\t\tgiant,
\t\t\tfail
\t\t)
\t\t\t-- body
\t\tend

It still wouldn't pass code review, but at least it's consistent. ;)

/s/ Adam