A method or constructor has more parameters than the configured maximum
What it finds
Many parameters make every call hard to read and easy to get wrong in order; they often travel together and belong in a type of their own. Overrides and explicit interface implementations, whose signatures are given, are left alone, and so are extern methods. The maximum is the parameter max_parameters, 7 by default.
From the rule's source, long_parameter_list.rs.
class Orders{ void Place(int a, int b, int c, int d, int e, int f, int g, int h) { }tx0 reports: Place has 8 parameters, more than 7 void Small(int a, int b) { }} 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/csharp: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/csharp:long-parameter-list] reason="..."tx0 explain tx0/csharp:long-parameter-list shows the same in the terminal. Found a false positive? Report it.