LuaLS / LuaLS/lua-language-server
Syntax warning / error not flagged as such.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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:
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện báo cáo trong extension Visual Studio Code bằng đoạn mã Lua local varA, varB functionCalledHere(). Trước tiên, hãy truy vết cách các chẩn đoán cú pháp được tạo ra cho khai báo chưa hoàn chỉnh này, sau đó thêm một bài kiểm thử hồi quy cho đoạn mã và xác minh rằng một cảnh báo hoặc lỗi được báo cáo thay vì không có chẩn đoán nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100