luacheck only looks for three things: non-standard global variables, unused local variables and redefinitions of existing local variables in the same scope.
luacheck provides a command-line interface as well as a small library which can be used from another Lua program.
Versions
Dependencies
ansicolors >= 1.0-1
argparse >= 0.2.0
checks >= 1.0
lua >= 5.1, < 5.3
metalua-parser >= 0.7.3-2