LuaLS / LuaLS/lua-language-server
Feature Request: Missing Field Diagnostic on Non-Class Table Types
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
(Split from: https://github.com/LuaLS/lua-language-server/issues/2279)
Currently the missing-field diagnostic only works for classes. I sometimes use tables directly instead of classes and it would be nice to still be able to get missing-field warnings:
Ex:
---@param audience { [0]: "SELECT", ["peer_ids"]: string | string[] } who to send event to
function Events.send_event(audience, event, ...)
end
Events.send_event({})
and
---@param audience { [0]: "SELECT", peer_ids: string | string[] } who to send event to
function Events.send_event(audience, event, ...)
end
Events.send_event({})
gives no errors
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
Start by reproducing the two Events.send_event examples from the issue and inspect the existing missing-field diagnostic behavior for classes. Trace how the table parameter types in those examples are analyzed, then verify that calls passing {} report the required fields without changing the existing class behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- lua
- Domínio
- devtools
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100