You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When --stylua: ignore start/end comments are applied back-to-back, they take effect on every second ignored block. This might be considered as a non-issue because they can be merged into one single ignored block, but it might be inconvenient when they are separated with large comment block.
My understanding is that "this comment must be preceding a statement (same as -- stylua: ignore), and cannot cross block scope boundaries" holds here, although I am not sure about it.
Steps to reproduce:
Create file tmp.lua with the following contents:
--stylua: ignore startlocala=1--stylua: ignore end--stylua: ignore startlocalb=2--stylua: ignore end--stylua: ignore startlocalc=3--stylua: ignore end-- Some very large comment--stylua: ignore startlocald=4--stylua: ignore end
Run stylua tmp.lua.
Currently observed output:
--stylua: ignore startlocala=1--stylua: ignore end--stylua: ignore startlocalb=2--stylua: ignore end--stylua: ignore startlocalc=3--stylua: ignore end-- Some very large comment--stylua: ignore startlocald=4--stylua: ignore end
Details:
Version of StyLua: 0.12.5
OS: Xubuntu 20.04.
The text was updated successfully, but these errors were encountered:
where --stylua: ignore end and --stylua: ignore start are both leading trivia of the local b statement.
We are probably exiting early when we see the --stylua: ignore end comment in the leading trivia, but we should continue scanning in case we find another ignore comment afterwards
When
--stylua: ignore start/end
comments are applied back-to-back, they take effect on every second ignored block. This might be considered as a non-issue because they can be merged into one single ignored block, but it might be inconvenient when they are separated with large comment block.My understanding is that "this comment must be preceding a statement (same as
-- stylua: ignore
), and cannot cross block scope boundaries" holds here, although I am not sure about it.Steps to reproduce:
tmp.lua
with the following contents:stylua tmp.lua
.Currently observed output:
Details:
The text was updated successfully, but these errors were encountered: