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 does not warn about accessing nonexistent members of table #205

Open
crabdancing opened this issue Oct 30, 2020 · 3 comments
Open

Comments

@crabdancing
Copy link

I create code with the following contents:

local some_namespace = {}
some_namespace.nonexistent_function()
print(some_namespace.whyyyyy)

Result:

$ luacheck badcode.lua
Checking badcode.lua                              OK

Total: 0 warnings / 0 errors in 1 file
@Seadragon91
Copy link

Please read #198

@crabdancing crabdancing changed the title luacheck does not warn about accessing nonexistent members of luacheck does not warn about accessing nonexistent members of table Oct 31, 2020
@crabdancing
Copy link
Author

Aww that's really sad :c I hope you find someone who can help take care of this repo.

@alerque
Copy link

alerque commented Oct 7, 2021

I don't think this is something luacheck is ever going to be able to check. You would have to execute the code in order to know for sure what was or wasn't in a Lua table. There is no way to know with any confidence from just lexing the language as you show. Also Lua has ways of handling this where calling non-existing methods can actually create/load them etc.

If you still feel this is something that needs more feedback please open a new issue on the new official repository here. In the mean time please consider closing this issue to help tidy up as there is nobody with permissions to do so—only issue authors can close their own.

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

No branches or pull requests

3 participants