Skip to content

SA1316 (Tuple element names should use correct casing) is not always triggered for incorrectly cased explicit member names #3947

@bjornhellander

Description

@bjornhellander

I created a separate issue for one of the cases mentioned in #3878

In my opinion, this should always trigger SA1316:
var tuple = (x: 1, Y: 2);

The current behavior is that it only triggers when includeInferredTupleElementNames is true.

This analyzer is very clearly implemented to skip all analysis of tuple expressions if includeInferredTupleElementNames is false, so this does not seem to be a mistake, but I don't understand why this is. I suggest the behavior is changed to analyze tuple expressions regardless of the includeInferredTupleElementNames setting.

Tested using version 1.2.0-beta.556.

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