lloyAlloy on GitHub
unused_function
Docs

unused_function

Updated

A function that nothing calls.

A function, a local function, an async function, or a local or const bound to a function value, whose name appears nowhere else in the file. An exported function, and a method of an impl or a trait, are for other files and do not fire. A function with an attribute above it does not fire either: @test and a declared attribute mark a function the runtime reaches by its attribute, and @deprecated, @cfg, and Luau's @[...] list keep that rule. Prefix the name with _ to keep it on purpose; alloy flux --fix does that.

Set its level in the [lint] table of alloy.toml, or for one file with --@alloy-lint.