Closed ahicks92 closed 2 weeks ago
This is a duplicate of #407. It will be fixed by #854 which will introduce a way to configure the style of syntax used at runtime in the stylua.toml
file
Hmm thanks. I did look before posting this. Sorry about that. Looking forward to the changes.
Stylua 0.20.0. I wish I had a minimum repro but the very obvious repros aren't triggering it I'm afraid so the block of code is longer.
Why it matters: we can't use the official GH action to reliably format code containing labels because it enables luau, and there don't seem to be variants to let us use another asset or something like that to only have the lua variants.
Anyhow:
cargo install stylua --features lua52,luau
On both formatting and checking, we get:
And the code, as minimal as I could get it:
This is the Lua "continue idiom":
::continue::
as a label and goto continue. I did think okay it's a keyword so let's rename it.::cont::
, but that didn't work either. And I'm sure it doesn't trigger on all labels--it certainly didn't on small test cases.Note that Luau itself dropped goto. Not sure if that's relevant to the problem but I did also check that.