> All I want to do is to check some code for missing declarations and unused variables! There are no declarations in Lua. See this for finding undefined globals: http://lua-users.org/lists/lua-l/2012-12/msg00397.html See also http://lua-users.org/wiki/DetectingUndefinedVariables Finding unused variables is harder. You may want to write your own checker using lbci, my bytecode inspector library: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lbci