LuaLS / LuaLS/lua-language-server
`duplicate-set-field` is reading from CoreLibs even though `diagnostics.libraryFiles` is set to 'Disable'
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
main.lua、playdate.update() 行、および Disable に設定した Lua.diagnostics.libraryFiles 設定を使用して警告を再現し、診断結果を CoreLibs/__stub.lua と比較する。duplicate-set-field 診断がライブラリファイルをどのように扱うかを追跡し、設定の文書化された動作を確認する。観測された警告の動作が意図された設定と一致すれば完了とする。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100