lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Is there a utility that does static analysis of lua code?  Specifically,
>I would like it to point out variables that should be local (only
>referenced inside a single chunk/block/scope), variables that are only
>referenced once at all (probable misspellings), local variables that
>shadow other variables, etc.  Essentially, a static debugger to assist
>in developing maintainable code in a loosely-typed embedded scripting
>language.

Tools like that can be easily made by parsing luac -l output.
For an example, see test/globals.lua in the distribution.
--lhf