Skip to content

SA1316 should not be reported for tuple deconstruction #3878

@Arthri

Description

@Arthri

Tuples can follow two different casing conventions depending on how it's used: tuple types may follow pascal casing, while deconstruction may follow camel casing

The rule does not differentiate between the two uses and indiscriminately flags both, so I propose having a separate rule for tuple deconstruction

// no diagnostic
(string K, string V) a = ("", "");
// SA1316
(string k, string v) = a;

// SA1316
foreach ((string k, string v) in dict)
{
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions