LuaLS / LuaLS/lua-language-server
Syntax warning / error not flagged as such.
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Lua
- Estrelas
- 4.4k
- Forks
- 442
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### 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_
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza o relato na extensão do Visual Studio Code usando o snippet de Lua `local varA, varB functionCalledHere()`. Comece rastreando como os diagnósticos de sintaxe são produzidos para essa declaração incompleta, depois adicione um teste de regressão para o snippet e verifique se um aviso ou erro é reportado, em vez de nenhum diagnóstico.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- lua
- Domínio
- devtools
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 48/100