Open
Description
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?
Formatting
Expected Behaviour
I do not see a warning for duplicate-set-field
in my project.
Actual Behaviour
Hi
Thanks for this plugin. I am getting warning for duplicate-set-field
on this line:
function playdate.update()
and the duplicate is in the CoreLibs
folder here:
...\PlaydateSDK\CoreLibs\__stub.lua
I have set the CoreLibs folder to be ignored by the code checker:
"Lua.diagnostics.libraryFiles": "Disable",
Is this the expected behaviour?
Reproduction steps
- Install Lua language server plugin
- Set
"Lua.diagnostics.libraryFiles": "Disable",
- Create
main.lua
- Add the line
function playdate.update()
tomain.lua
- Observe warning:
"resource": "/e:/dev/miner/Source/main.lua",
"owner": "_generated_diagnostic_collection_name_#0",
"code": "duplicate-set-field",
"severity": 4,
"message": "Duplicate field `update`.",
"source": "Lua Diagnostics.",
"startLineNumber": 72,
"startColumn": 10,
"endLineNumber": 72,
"endColumn": 25,
"relatedInformation": [
{
"startLineNumber": 5,
"startColumn": 10,
"endLineNumber": 5,
"endColumn": 25,
"message": ".twopolefilter.s",
"resource": "/e:/devtools/PlaydateSDK/CoreLibs/__stub.lua"
}
]
}]
Additional Notes
No response
Log File
No response