Skip to content

Commit ab2dfbf

Browse files
committed
fix(diagnostics): fix arg list using the diagnostic node rather than the source node for missing-export-doc
1 parent 6c613e6 commit ab2dfbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

script/core/diagnostics/helper/missing-doc-helper.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ local function checkFunctionNamed(functionName, source, diagnosticRangeSource, b
4848
paramId, returnId)
4949
diagnosticRangeSource = diagnosticRangeSource or source
5050
bindDocsSource = bindDocsSource or source
51-
local argCount = diagnosticRangeSource.args and #diagnosticRangeSource.args or 0
51+
local argCount = source.args and #source.args or 0
5252

5353
if argCount == 0 and not source.returns and not bindDocsSource.bindDocs then
5454
callback {

test/diagnostics/missing-export-doc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ end
7070
TEST [[
7171
local M = {}
7272
73-
function <!M:f1()!> end
73+
function <!M:f1!>() end
7474
7575
---comment
7676
function M:f2()

0 commit comments

Comments
 (0)