Skip to content
New issue

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

luacheck show warning when use "module" function in lua5.1 #15

Open
stzb321 opened this issue Apr 9, 2021 · 0 comments
Open

luacheck show warning when use "module" function in lua5.1 #15

stzb321 opened this issue Apr 9, 2021 · 0 comments

Comments

@stzb321
Copy link

stzb321 commented Apr 9, 2021

Here is example of code:
a.lua

module("aModule" ,package.seeall)
AMethod = function()
    print("AMethod")
end

b.lua

aModule.AMethod()

.luacheckrc

std = "lua51"
codes = true
allow_defined_top = true

luacheck show accessing undefined variable warning when checking b.lua
image

In a.lua, aModule already be defined as a global variable.
Is the module function not supported in luacheck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant