-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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.luawith the following contents:
--stylua: ignore start
local a = 1
--stylua: ignore end
--stylua: ignore start
local b = 2
--stylua: ignore end
--stylua: ignore start
local c = 3
--stylua: ignore end
-- Some very large comment
--stylua: ignore start
local d = 4
--stylua: ignore end- Run
stylua tmp.lua.
Currently observed output:
--stylua: ignore start
local a = 1
--stylua: ignore end
--stylua: ignore start
local b = 2
--stylua: ignore end
--stylua: ignore start
local c = 3
--stylua: ignore end
-- Some very large comment
--stylua: ignore start
local d = 4
--stylua: ignore endDetails:
- Version of StyLua: 0.12.5
- OS: Xubuntu 20.04.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working