Documentation
¶
Overview ¶
Package lua implements a gorisk analyzer for Lua projects. It supports luarocks.lock and *.rockspec files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIRGraph ¶
func BuildIRGraph(g *graph.DependencyGraph) ir.IRGraph
BuildIRGraph builds a function-level IR graph for a Lua dependency graph.
func Detect ¶
func Detect(dir string) capability.CapabilitySet
Detect walks .lua files in dir and returns the combined capability set.
func DetectFunctions ¶
func DetectFunctions(dir, pkgName string, files []string) (map[string]ir.FunctionCaps, []ir.CallEdge, error)
DetectFunctions parses Lua files and returns per-function capability sets and call edges.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements the analyzer.Analyzer interface for Lua projects.
type LuaPackage ¶
LuaPackage represents a Lua dependency extracted from a lockfile.
func Load ¶
func Load(dir string) (pkgs []LuaPackage, retErr error)
Load detects and parses the Lua dependency manifest in dir. Tries luarocks.lock first, then falls back to *.rockspec. Load never panics; it returns a structured error on failure.