Here are various resources related to [program analysis] (both static code analysis or dynamic program analysis) of Lua code.
- editor/IDE related:
- parsing:
- LuaGrammar - resources on lexing/compiling Lua. Some specifically used for static analysis include
- MetaLua - among other things, includes pure Lua libraries for Lua code (optionally with syntax extensions) to AST conversion.
- [LuaParse][5] - pure Lua lexer/parser, with semantically aware HTML highlighter
- LuaFish - Lua source to AST converter (via LuaPeg), plus some analysis support
- linting:
- DetectingUndefinedVariables
- [lua-checker] - lint-like analysis tool for Lua. Does basic checks.
- luaanalyze (bottom of LuaFish page) - new version of LuaFish, based on MetaLua.
- LuaInspect, mentioned above, is also usable outside an editor
- [selene] - selene is a very fast and performant Lua linter written in Rust to help write correct and idiomatic Lua code. Supports standard Lua 5.1 and Luau syntax. Standard library support exists for Lua 5.1, Lua 5.2, Lua 5.3, Luau and Roblox Luau.
- [Luacheck] - simple static checker. Supports Lua 5.1–5.4 and is available via LuaRocks.
- optimization/refactoring:
- SourceOptimizer - source code transformation, mainly inlining functions.
- Some such things are done in LuaJIT2 [6]
- coverage:
- profiling: ProfilingLuaCode (dynamic analysis)
- debugging: DebuggingLuaCode (dynamic analysis)
- unit testing: UnitTesting
- miscellaneous: [Software Verification] has various commercial program analysis tools for Lua.
- mining/content analysis: MiningLuaCode
- LuaImplementationVerification - validating the correctness of the Lua implementations themselves
RecentChanges · preferences
edit · history
Last edited March 28, 2023 2:56 pm GMT (diff)