You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FS3886: This list expression contains a single tuple element. This warning is too trigger happy #20962
I don't think this suggestion is consistent. If 1,"a" is valid as a tuple, then 1,1 is also valid, and anything valid should not be warned about.
My guess is it's unlikely to be a decision (e.g. strongly held enough to put in the official style guide) that tuples in F# should be bracketed in cases like the above.
That means this warning should always be removed.
The wording of the warning also makes this clear: the answer could be "no I didn't" in which case there is nothing to fix.
It's using guesswork about the intent of the writer of the code, but writers of code now are typically AIs and they do confuse commas and semicolons like we do.
Activity
charlesroddie commentedon Nov 10, 2026
I don't think this suggestion is consistent. If
1,"a"is valid as a tuple, then1,1is also valid, and anything valid should not be warned about.My guess is it's unlikely to be a decision (e.g. strongly held enough to put in the official style guide) that tuples in F# should be bracketed in cases like the above.
That means this warning should always be removed.
The wording of the warning also makes this clear: the answer could be "no I didn't" in which case there is nothing to fix.
It's using guesswork about the intent of the writer of the code, but writers of code now are typically AIs and they do confuse commas and semicolons like we do.
majocha commentedon Nov 10, 2026
I'd say the warning make sense only if this causes a type error upstream.
T-Gro commentedon Nov 10, 2026
So how would one describe the ruleset?
If FS3886 and no warning from {selection of upstream errors that could be produced by it}, opt out of FS3886 ?
shayanhabibi commentedon Nov 11, 2026
I'm not the greatest fan of this warning. I understand the intent though.
I understand the authors point too, the reason that the warning makes no sense if the types are disjoint is because the warnings 'fix' is an error.
[1,1]/[1;1]is not an error[1,"1"]is not an error /[1; "1"]is an error