-
-
Notifications
You must be signed in to change notification settings - Fork 383
Open
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Annotations
Expected Behaviour
@NODISCARD annotated functions should always trigger the discard-return
s warning in any context.
Actual Behaviour
discard-returns
does not trigger in while and repeat loops.
Reproduction steps
---@nodiscard
local function bar()
--@nodiscard annotated function
end
while true do
bar() --< this DOES NOT trigger no-discard
break
end
repeat
bar() --< this DOES NOT trigger no-discard
break
until true
bar() -- < this DOES trigger no-discard
for index, value in ipairs({}) do
bar() -- < this DOES trigger no-discard
end
Additional Notes
No response
Log File
No response
clay-golem
Metadata
Metadata
Assignees
Labels
No labels