lloyAlloy on GitHub
argument_count
Docs

argument_count

Updated

A call passes more arguments than the function takes.

The extra values are evaluated and dropped, so a mistake in the argument order reads as working code. The lint counts a call of a function with a fixed parameter list that the file or an imported module declares: a plain name, M.f through import * as M, a static, a method on a value the file types with an annotation or a new, a function in a table a local holds, and the constructor that new W(a) calls. A vararg, a default, or a name declared twice makes the count a range and the lint stands down. The checker reports the other direction, a call with too few arguments.

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