ToString() is called on an array, which gives its type name and not its elements
What it finds
Arrays do not override ToString: values.ToString() gives System.Int32[], whatever the values. string.Join(", ", values) lists them.
From the rule's source, array_to_string.rs.
class Print{ string Show(int[] values, string name) { var a = values.ToString();tx0 reports: values is an array; ToString() gives its type name return a + string.Join(", ", values) + name.ToString(); }} 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:array-to-string" = "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:array-to-string] reason="..."tx0 explain tx0/csharp:array-to-string shows the same in the terminal. Found a false positive? Report it.