We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Visual Studio Code Extension (sumneko.lua)
Linux
Type Checking
I expected no warnings
There is a redundant return value warning
Here's an example where string paths are transformed to their package.loaded value
local imports = { mod1 = "src.mod1", mod2 = "src.mod2" } return setmetatable({}, { __pairs = function(_) local iter = pairs(imports) local newiter = function (table, index) local k, path = iter(table, index) return k, package.loaded[path] end --- LuaLS is wrong here ---@diagnostic disable-next-line:redundant-return-value return newiter, imports, nil end })
https://www.lua.org/pil/7.3.html
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Type Checking
Expected Behaviour
I expected no warnings
Actual Behaviour
There is a redundant return value warning
Reproduction steps
Here's an example where string paths are transformed to their package.loaded value
Additional Notes
https://www.lua.org/pil/7.3.html
Log File
No response
The text was updated successfully, but these errors were encountered: