LuaLS / LuaLS/lua-language-server
Busted addon doesn't set assert to luassert
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 442
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Windows WSL
What is the issue affecting?
Libraries
Expected Behaviour
Using busted and luassert addons should set the type for the builtin assert object to be luassert
Actual Behaviour
assert type still the simple function.
Reproduction steps
server settings:
"workspace": {
"checkThirdParty": 'Disable',
"library": [
"${addons}/luassert/module/library/",
"${addons}/busted/module/library/"
]
}
Additional Notes
I managed to locally fix by changing the busted addon from
assert = require("luassert")
spy = require("luassert.spy")
stub = require("luassert.stub")
mock = require("luassert.mock")
to
---@type luassert
assert = require("luassert")
---@type luassert.spy
spy = require("luassert.spy")
---@type luassert.stub
stub = require("luassert.stub")
---@type luassert.mock
mock = require("luassert.mock")
For some reason, the luals is not setting the correct type trhough the assignment done by the busted addon.
Log File
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’addon difettoso e confronta la sua assegnazione di assert con quella dell’addon luassert, usando le impostazioni di NeoVim e i passaggi per la riproduzione forniti. Il lavoro è completato quando l’assert integrato viene inferito come luassert con entrambi gli addon abilitati, mentre spy, stub e mock mantengono i tipi previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100