LuaLS / LuaLS/lua-language-server
Advanced missing nil check
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
This is probably really hard to "fix".
```lua
---@type table|nil
local blueprint = { x = 1 }
local hasBlueprint = true
if blueprint == nil then
hasBlueprint = false
end
if hasBlueprint then
error("no blueprint found")
end
local s = blueprint.x
```

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 by reproducing the provided Lua example and inspect the language server's nil-check and control-flow analysis. Confirm the expected diagnostic for the access to blueprint.x, then trace the relevant analyzer entry point and add or update focused coverage so the shown case is handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100