Skip to content

Don't offer to fix naming for record parameters #47509

Merged
davidwengier merged 5 commits intodotnet:masterfrom
davidwengier:DontFixRecordParameters
Sep 21, 2020
Merged

Don't offer to fix naming for record parameters #47509
davidwengier merged 5 commits intodotnet:masterfrom
davidwengier:DontFixRecordParameters

Conversation

@davidwengier
Copy link
Member

Fixes #47508

Not sure if this is a controversial opinion that needs to go to a design meeting first, or not, but its a long weekend in the US. Worst case this gets closed ¯\_(ツ)_/¯

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this completely ignore positional parameters and never offers a diagnostic for?

I think it's useful to have a diagnostic for violating the naming convention, just don't offer "cyclic" diagnostics/codefixes.

@davidwengier
Copy link
Member Author

It still offers a diagnostic, and therefore fixer, for when they violate property naming conventions, and there is a test for it too :)

@CyrusNajmabadi
Copy link
Contributor

We should def discuss this. We need a general team agreement on how to treat the dual prop/param nature of records. Tagging @jcouv as well

@davidwengier
Copy link
Member Author

I was looking in general at records issues (posted something in Teams too) and I feel pretty strongly that the parameters and properties should be considered in the same way for records, but happy to discuss. At the moment support is inconsistent and there are some sharp edges.

@davidwengier
Copy link
Member Author

Thanks @sharwell, fixed that issue. Records are so nice to use as a single line declaration, I forget its legal for them to be any bigger :)

@davidwengier davidwengier requested a review from a team September 19, 2020 06:09
@davidwengier davidwengier force-pushed the DontFixRecordParameters branch from f051a67 to c8f78c8 Compare September 21, 2020 05:57
@davidwengier davidwengier merged commit d171b0b into dotnet:master Sep 21, 2020
@ghost ghost added this to the Next milestone Sep 21, 2020
@davidwengier davidwengier deleted the DontFixRecordParameters branch September 21, 2020 11:34
@dibarbet dibarbet modified the milestones: Next, 16.8.P4 Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IDE1006 thinks positional parameters on records are parameters and properties

5 participants