A function takes more parameters than the configured maximum
What it finds
A call with many arguments is hard to read and easy to get wrong: arguments of the same type can be swapped without the compiler noticing. A struct of options, or splitting the function, keeps calls readable. self does not count, and closures are not checked, since their signatures are often fixed by what they are passed to. The maximum is the parameter max_parameters, 7 by default.
From the rule's source, long_parameter_list.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/rust:long-parameter-list" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/rust:long-parameter-list] reason="..."tx0 explain tx0/rust:long-parameter-list shows the same in the terminal. Found a false positive? Report it.