lua-users home
lua-l archive

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

On 2017-06-14 04:47 PM, Coda Highland wrote:
On Wed, Jun 14, 2017 at 2:45 PM, David Goehrig <> wrote:
On Wed, Jun 14, 2017 at 3:31 PM, Soni L. <> wrote:

<tab><tab>local function uh(oops, something, tells, me, this, is, a,

Have fun getting that aligned.

My scripts won't align that, and they would reject that code for a number of

1.) too many layers of indentation
2.) too many parameters to  the function
3.) function is a no-op / has no lines of code

Granted you'd fail code review on my team if you submitted something that
looked like that :)

Mine would end up aligning it as:

\t\tlocal function uh(
\t\t\t-- body

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

/s/ Adam

\tlocal function f(u)
\t\tlocal v = u:match('^([^/]+)/') ..
\t\tif v:match("^nope:") then
\t\t\treturn nil, v:match("^nope:(.*)$")
\t\treturn v

Have fun getting line 3 to align with line 2 when you're not using tab width = 2.

Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.