Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined @param warning if parameters are in separate lines #1446

Closed
mfussenegger opened this issue Aug 7, 2022 · 1 comment
Closed

Undefined @param warning if parameters are in separate lines #1446

mfussenegger opened this issue Aug 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@mfussenegger
Copy link

How are you using the lua-language-server?

NeoVim

Which OS are you using?

Linux

What is the issue affecting?

Annotations

Expected Behaviour

No diagnostics warning

Actual Behaviour

Server reports a warning

Reproduction steps

Create a file with:

---@param foo table
local function bar(foo)
  print(foo)
end

---@param foo table
local function baz(
  foo
)
  print(foo)
end

bar({})
baz({})

lua-language-server 3.5.2 reports a "Undefined param foo" warning on baz. On bar no warning is reported.
This is mostly a problem with many parameters where tools like stylua start to put all parameters on a newline.

Additional Notes

No response

Log File

No response

@sumneko sumneko added the bug Something isn't working label Aug 7, 2022
@klaushipp
Copy link

Same here:
How are you using the lua-language-server?
Visual Studio Code

Which OS are you using?
Windows

lua-language-server 3.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants