@@ -9,6 +9,8 @@ indent_style = space
99
1010# (Please don't specify an indent_size here; that has too many unintended consequences.)
1111
12+ file_header_template = Copyright (c) Microsoft. All rights reserved.\nLicensed under the MIT License. See LICENSE in the project root for more information.
13+
1214[* .yml ]
1315indent_size = 2
1416indent_style = space
@@ -36,10 +38,10 @@ indent_style = space
3638[* .{cs,vb} ]
3739# Sort using and Import directives with System.* appearing first
3840dotnet_sort_system_directives_first = true
39- dotnet_style_qualification_for_field = true :warning
40- dotnet_style_qualification_for_property = true :warning
41- dotnet_style_qualification_for_method = true :warning
42- dotnet_style_qualification_for_event = true :warning
41+ dotnet_style_qualification_for_field = false :warning
42+ dotnet_style_qualification_for_property = false :warning
43+ dotnet_style_qualification_for_method = false :warning
44+ dotnet_style_qualification_for_event = false :warning
4345
4446# Use language keywords instead of framework type names for type references
4547dotnet_style_predefined_type_for_locals_parameters_members = true :suggestion
@@ -73,15 +75,15 @@ dotnet_naming_symbols.constants.required_modifiers = const
7375
7476dotnet_naming_style.constant_style.capitalization = pascal_case
7577
76- # Static fields are camelCase
78+ # Static readonly fields are PamelCase
7779dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
7880dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
79- dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
81+ dotnet_naming_rule.static_fields_should_be_camel_case.style = static_readonly_field_style
8082
8183dotnet_naming_symbols.static_fields.applicable_kinds = field
82- dotnet_naming_symbols.static_fields.required_modifiers = static
84+ dotnet_naming_symbols.static_fields.required_modifiers = static, readonly
8385
84- dotnet_naming_style.static_field_style .capitalization = camel_case
86+ dotnet_naming_style.static_readonly_field_style .capitalization = pascal_case
8587
8688# Instance fields are camelCase
8789dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
@@ -91,6 +93,7 @@ dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_s
9193dotnet_naming_symbols.instance_fields.applicable_kinds = field
9294
9395dotnet_naming_style.instance_field_style.capitalization = camel_case
96+ dotnet_naming_style.instance_field_style.required_prefix = _
9497
9598# Locals and parameters are camelCase
9699dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
@@ -125,13 +128,13 @@ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
125128csharp_indent_block_contents = true
126129csharp_indent_braces = false
127130csharp_indent_case_contents = true
128- csharp_indent_switch_labels = true
131+ csharp_indent_switch_labels = false
129132csharp_indent_labels = flush_left
130133
131134# Prefer "var" everywhere
132- csharp_style_var_for_built_in_types = false
135+ csharp_style_var_for_built_in_types = true : suggestion
133136csharp_style_var_when_type_is_apparent = true :suggestion
134- csharp_style_var_elsewhere = false : warning
137+ csharp_style_var_elsewhere = true : suggestion
135138
136139# Prefer method-like constructs to have a block body
137140csharp_style_expression_bodied_methods = false :none
0 commit comments