Skip to content

Commit f4693fd

Browse files
committed
Update .editorconfig for VS2017.
Note that some C#7 features are disabled for Unity compatibility. These restriction will be unlocked in Unity 2017.1
1 parent 4339e5a commit f4693fd

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.editorconfig

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,67 @@ tab_width = 4
2323
[*.{xml,csproj}]
2424
indent_style = space
2525
indent_size = 2
26+
27+
# From https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
28+
# and https://github.com/dotnet/roslyn/blob/master/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs
29+
[*.cs]
30+
dotnet_style_qualification_for_field = true:warning
31+
dotnet_style_qualification_for_property = true:warning
32+
dotnet_style_qualification_for_method = true:warning
33+
dotnet_style_qualification_for_event = true:warning
34+
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
35+
dotnet_style_predefined_type_for_member_access = false:warning
36+
dotnet_style_object_initializer = true:suggestion
37+
dotnet_style_collection_initializer = true:suggestion
38+
dotnet_style_explicit_tuple_names = true:suggestion
39+
dotnet_style_coalesce_expression = true:warning
40+
csharp_style_var_for_built_in_types = true:suggestion
41+
csharp_style_var_when_type_is_apparent = true:suggestion
42+
csharp_style_var_elsewhere = true:suggestion
43+
dotnet_sort_system_directives_first = true
44+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
45+
csharp_space_between_method_declaration_parameter_list_parentheses = true
46+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
47+
csharp_space_between_method_call_name_and_opening_parenthesis = false
48+
csharp_space_between_method_call_parameter_list_parentheses = true
49+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
50+
csharp_space_between_parentheses = expressions,type_casts,control_flow_statements
51+
csharp_space_after_keywords_in_control_flow_statements = true
52+
csharp_space_after_cast = false
53+
csharp_space_around_declaration_statements = true
54+
csharp_space_before_open_square_brackets = false
55+
csharp_space_between_empty_square_brackets = false
56+
csharp_space_between_square_brackets = true
57+
csharp_space_after_colon_in_inheritance_clause = true
58+
csharp_space_after_comma = true
59+
csharp_space_after_dot = false
60+
csharp_space_after_semicolon_in_for_statement = true
61+
csharp_space_before_colon_in_inheritance_clause = true
62+
csharp_space_before_comma = false
63+
csharp_space_before_dot = false
64+
csharp_space_before_semicolon_in_for_statement = false
65+
csharp_space_around_binary_operators = true
66+
csharp_indent_braces = false
67+
csharp_indent_block_contents = true
68+
csharp_indent_switch_labels = true
69+
csharp_indent_case_contents = false
70+
csharp_indent_labels = false
71+
csharp_preserve_single_line_blocks = true
72+
csharp_preserve_single_line_statements = true
73+
csharp_new_line_before_open_brace = all
74+
csharp_new_line_between_query_expression_clauses = true
75+
76+
# Disabled for Unity compatibility until 2017.1 RTM
77+
[*.cs]
78+
dotnet_style_null_propagation = false:warning
79+
csharp_style_expression_bodied_methods = false:warning
80+
csharp_style_expression_bodied_constructors = false:warning
81+
csharp_style_expression_bodied_operators = false:warning
82+
csharp_style_expression_bodied_properties = false:warning
83+
csharp_style_expression_bodied_indexers = false:warning
84+
csharp_style_expression_bodied_accessors = false:warning
85+
csharp_style_pattern_matching_over_is_with_cast_check = false:warning
86+
csharp_style_pattern_matching_over_as_with_null_check = false:warning
87+
csharp_style_inlined_variable_declaration = false:warning
88+
csharp_style_throw_expression = false:warning
89+
csharp_style_conditional_delegate_call = false:warning

0 commit comments

Comments
 (0)