|
|
||
|
Follows a nice script to detect missing "local" declarations and other "wrong" uses of global variables.
Simply put it in your path and add require"strict" to your program (or call "lua -lstrict").
-- Roberto
-- strict.lua
-- checks uses of undeclared global variables
-- All global variables must be 'declared' through a regular assignment
-- (even assigning nil will do) in a main chunk before being used
-- anywhere or assigned to inside a function.
-- Olivier Mascia