diff --git a/moonscript/cmd/lint.lua b/moonscript/cmd/lint.lua index 24e144a..b47842b 100644 --- a/moonscript/cmd/lint.lua +++ b/moonscript/cmd/lint.lua @@ -14,7 +14,43 @@ do Block = _obj_0.Block end local whitelist_globals = Set({ - "print" + 'loadstring', + 'select', + '_VERSION', + 'pcall', + 'package', + 'error', + 'rawget', + 'pairs', + 'xpcall', + 'rawlen', + 'io', + 'loadfile', + 'ipairs', + 'table', + 'require', + 'os', + 'module', + 'debug', + 'type', + 'getmetatable', + 'rawequal', + 'dofile', + 'unpack', + 'math', + 'load', + 'bit32', + 'string', + 'rawset', + 'tostring', + 'print', + 'assert', + '_G', + 'next', + 'setmetatable', + 'tonumber', + 'collectgarbage', + 'coroutine' }) local LinterBlock do diff --git a/moonscript/cmd/lint.moon b/moonscript/cmd/lint.moon index dd3568d..b0fcd58 100644 --- a/moonscript/cmd/lint.moon +++ b/moonscript/cmd/lint.moon @@ -5,7 +5,43 @@ import Block from require "moonscript.compile" -- globals allowed to be referenced whitelist_globals = Set { - "print" + 'loadstring' + 'select' + '_VERSION' + 'pcall' + 'package' + 'error' + 'rawget' + 'pairs' + 'xpcall' + 'rawlen' + 'io' + 'loadfile' + 'ipairs' + 'table' + 'require' + 'os' + 'module' + 'debug' + 'type' + 'getmetatable' + 'rawequal' + 'dofile' + 'unpack' + 'math' + 'load' + 'bit32' + 'string' + 'rawset' + 'tostring' + 'print' + 'assert' + '_G' + 'next' + 'setmetatable' + 'tonumber' + 'collectgarbage' + 'coroutine' } class LinterBlock extends Block