Visualstudio-docs: dotnet_style_prefer* or dotnet_prefer in Expression-level configs

Created on 2 Mar 2018  Â·  16Comments  Â·  Source: MicrosoftDocs/visualstudio-docs

In doc there are two different identifiers. Which is the good one?
In the table:
dotnet_prefer_inferred_tuple_names
dotnet_prefer_inferred_anonymous_type_member_names
In the config example
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: 410f3156-99cc-2a5c-2696-9d354c4f34c7
  • Version Independent ID: fe3c3dfe-251f-2585-fe18-7fae3bcc76d0
  • Content
  • Content Source
  • Service: unspecified

All 16 comments

@pherbel good catch, thanks. @kuhlenh can you clarify which is correct? I think that dotnet_prefer is correct based on this example file:

Expression-level preferences

dotnet_style_object_initializer = true:silent
dotnet_style_collection_initializer = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:none
dotnet_style_require_accessibility_modifiers = always:suggestion
dotnet_prefer_inferred_tuple_names = true:suggestion
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion

According to https://github.com/madskristensen/EditorConfigLanguage/issues/40#issuecomment-372037059 it should be dotnet_style_*

The following two wrong names still show up incorrectly in the list at the top.
dotnet_prefer_inferred_tuple_names
dotnet_prefer_inferred_anonymous_type_member_names

They are specified differently in the correct dotnet_style_prefer namespace later in the article.

@gewarren @fenxu Could you please reopen this issue? As written by @grantborthwick there are still wrong names left in the article.

@cremor @grantborthwick Thank you both; I'll get it updated.

@gewarren I don't want to be annoying, but there are still wrong names left. To be more specific, it's in the Example EditorConfig file section

@cremor Thanks for catching that! It may have snuck in after I did a find/replace. This should be fixed later today.

@gewarren Looks like the update didn't make it: dotnet_prefer_inferred_tuple_names - without style ;) - is still listed in the example EditorConfig.

@fowl2 Thanks for letting me know. Feel free to fix it, or I can.

@fowl2 Thanks for letting me know. Feel free to fix it, or I can.

@gewarren Touche, PR #1674 open ;)

Looks like these are all fixed now.

Looks like these are all fixed now.

VS 2019 creates .editorconfig with wrong identifiers.

@Deni35 For product issues, can you log it on Developer Community be selecting Help > Send Feedback > Report a Problem (from within Visual Studio)?

@Deni35 Alternatively you could open an issue in the Roslyn repo because that's where the EditorConfig export code was implemented (see dotnet/roslyn#30043).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpodolak picture tpodolak  Â·  3Comments

Logerfo picture Logerfo  Â·  3Comments

CeciAc picture CeciAc  Â·  3Comments

rlundy picture rlundy  Â·  3Comments

gewarren picture gewarren  Â·  3Comments