LuaLS / LuaLS/lua-language-server
Redundant "Unable to execute code after break" diagnostic is given when using a label after a break
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
How are you using the lua-language-server?
Kakoune
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
No diagnostic is given.
Actual Behaviour
A diagnostic Unable to execute code after 'break' is given, even though the only thing after the break is a label.
Reproduction steps
Reproducible with the following code:
for i = 1, 10 do
if i < 8 then
print(i)
goto continue
end
break
::continue::
end
Additional Notes
No response
Log File
The log isn't very relevant in this case but here it is anyway.
luals.log
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Lua reproduction under Diagnostics/Syntax Checking and run it through the language server in Kakoune on Linux. Trace where the Unable to execute code after 'break' diagnostic is produced, then verify that the diagnostic is absent when the only following statement is the ::continue:: label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100