luaflow
luaflow copied to clipboard
A tool like GNU cflow but for Lua programming language
How to install
Install using LuaRocks:
$ luarocks install luaflow
How to use
luaflow [OPTIONS] luafile
OPTIONS:
-a, --ast dump AST
-d, --dot generate call graph dot file (GraphViz format)
-e, --exclude exclude this list of comma separated functions
-g, --graph generate call graph file (png format)
-m, --main main/entry function
-h, --help show this help message
Get a call tree
$ luaflow luaflow_lib.lua
Get a call graph (requires GraphViz)
$ luaflow -d luaflow_lib.lua > a.dot
$ dot -Tpng -o a.png a.dot
A call graph generated by luaflow analyzing itself
Get call tree starting from a function (given function name)
$ luaflow -m process_set_enter luaflow_lib.lua
Exclude function from call tree
$ luaflow -e insert luaflow_lib.lua