Skip to content

Name Style Check warning when accessing tables with variables #2122

Closed
@Rathoz

Description

@Rathoz

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?

Diagnostics/Syntax Checking

Expected Behaviour

Not getting a Name Style Check warning

Actual Behaviour

Getting a Name Style Check warning
image

Reproduction steps

Two simple cases with the issue

--Some comment about the file

local Bla = {}

function Bla.swapElements(tbl, i, j)
	tbl[i], tbl[j] = tbl[j], tbl[i]
end

return Bla
--Some comment about the file

local Bla = {}

function Bla.doSomething(tbl, i)
	tbl[i] = 3
end

return Bla

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions