-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Seems recently global-in-non-module was added, need error opt-in for Globals in module scope, because we don't want any accidentally leaked in the env, in the world of warcraft env globals are leaked through out the entire game, so we can't leak globals (they need unique names if we do).
in luacheck we can use 111 to check.
local abc = 1 -- no error
global1 = 2 -- should error unless allowed/line disabled when opted into errors
local function foo()
global1 = 1 -- error, unless the root variable was allowed/line disabled (in the module scope)
abc = 10 -- no error
endMetadata
Metadata
Assignees
Labels
No labels