LuaLS / LuaLS/lua-language-server
Syntax warning / error not flagged as such.
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### 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?
Diagnostics/Syntax Checking
### Expected Behaviour
A warning or an error that the line in question is not complete, regardless of how the parser it's run in processes it:
```lua
local varA, varB functionCalledHere()
```
### Actual Behaviour
No warning or error was given, resulting in a 20 minute hunt for a `nil` in one of the variables that shouldn't exist. The plugin did not flag the line as having a syntax warning or error, even if the Lua engine did not have an issue with the code per se.
### Reproduction steps
.
### Additional Notes
Apologies for raising another issue, but I couldn't find any information on if this is a niche feature of Lua or a bug that just hadn't been fixed in `5.1`. But if it's not a feature and is an unintended side-effort, I feel like it should be raised as a warning by the LLS to alert the user like "hey, are you sure this is what you were intending to do" similar to variables lacking a `nil`.
### Log File
_No response_
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用 Lua 程式碼片段 `local varA, varB functionCalledHere()` 在 Visual Studio Code 擴充功能中重現該報告。先追蹤這個不完整宣告的語法診斷是如何產生的,接著為該程式碼片段新增回歸測試,並確認回報的是警告或錯誤,而不是沒有診斷。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100