Update dependencies from https://github.com/dotnet/corefx build 20190910.22 (#26653)
[platform/upstream/coreclr.git] / .editorconfig
1 # EditorConfig is awesome:
2 http://EditorConfig.org
3
4 # top-most EditorConfig file
5 root = true
6
7 # Default settings:
8 # A newline ending every file
9 # Use 4 spaces as indentation
10 [*]
11 insert_final_newline = true
12 indent_style = space
13 indent_size = 4
14
15 # C# files
16 [*.cs]
17 # New line preferences
18 csharp_new_line_before_open_brace = all
19 csharp_new_line_before_else = true
20 csharp_new_line_before_catch = true
21 csharp_new_line_before_finally = true
22 csharp_new_line_before_members_in_object_initializers = true
23 csharp_new_line_before_members_in_anonymous_types = true
24 csharp_new_line_between_query_expression_clauses = true
25
26 # Indentation preferences
27 csharp_indent_block_contents = true
28 csharp_indent_braces = false
29 csharp_indent_case_contents = true
30 csharp_indent_switch_labels = true
31 csharp_indent_labels = one_less_than_current
32
33 # avoid this. unless absolutely necessary
34 dotnet_style_qualification_for_field = false:suggestion
35 dotnet_style_qualification_for_property = false:suggestion
36 dotnet_style_qualification_for_method = false:suggestion
37 dotnet_style_qualification_for_event = false:suggestion
38
39 # only use var when it's obvious what the variable type is
40 csharp_style_var_for_built_in_types = false:none
41 csharp_style_var_when_type_is_apparent = false:none
42 csharp_style_var_elsewhere = false:suggestion
43
44 # use language keywords instead of BCL types
45 dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
46 dotnet_style_predefined_type_for_member_access = true:suggestion
47
48 # name all constant fields using PascalCase
49 dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
50 dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols  = constant_fields
51 dotnet_naming_rule.constant_fields_should_be_pascal_case.style    = pascal_case_style
52
53 dotnet_naming_symbols.constant_fields.applicable_kinds   = field
54 dotnet_naming_symbols.constant_fields.required_modifiers = const
55
56 dotnet_naming_style.pascal_case_style.capitalization = pascal_case
57
58 # static fields should have s_ prefix
59 dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
60 dotnet_naming_rule.static_fields_should_have_prefix.symbols  = static_fields
61 dotnet_naming_rule.static_fields_should_have_prefix.style    = static_prefix_style
62
63 dotnet_naming_symbols.static_fields.applicable_kinds   = field
64 dotnet_naming_symbols.static_fields.required_modifiers = static
65
66 dotnet_naming_style.static_prefix_style.required_prefix = s_
67 dotnet_naming_style.static_prefix_style.capitalization = camel_case 
68
69 # internal and private fields should be _camelCase
70 dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
71 dotnet_naming_rule.camel_case_for_private_internal_fields.symbols  = private_internal_fields
72 dotnet_naming_rule.camel_case_for_private_internal_fields.style    = camel_case_underscore_style
73
74 dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
75 dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
76
77 dotnet_naming_style.camel_case_underscore_style.required_prefix = _
78 dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case 
79
80 # Code style defaults
81 dotnet_sort_system_directives_first = true
82 csharp_preserve_single_line_blocks = true
83 csharp_preserve_single_line_statements = false
84
85 # Expression-level preferences
86 dotnet_style_object_initializer = true:suggestion
87 dotnet_style_collection_initializer = true:suggestion
88 dotnet_style_explicit_tuple_names = true:suggestion
89 dotnet_style_coalesce_expression = true:suggestion
90 dotnet_style_null_propagation = true:suggestion
91
92 # Expression-bodied members
93 csharp_style_expression_bodied_methods = false:none
94 csharp_style_expression_bodied_constructors = false:none
95 csharp_style_expression_bodied_operators = false:none
96 csharp_style_expression_bodied_properties = true:none
97 csharp_style_expression_bodied_indexers = true:none
98 csharp_style_expression_bodied_accessors = true:none
99
100 # Pattern matching
101 csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
102 csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
103 csharp_style_inlined_variable_declaration = true:suggestion
104
105 # Null checking preferences
106 csharp_style_throw_expression = true:suggestion
107 csharp_style_conditional_delegate_call = true:suggestion
108
109 # Space preferences
110 csharp_space_after_cast = false
111 csharp_space_after_colon_in_inheritance_clause = true
112 csharp_space_after_comma = true
113 csharp_space_after_dot = false
114 csharp_space_after_keywords_in_control_flow_statements = true
115 csharp_space_after_semicolon_in_for_statement = true
116 csharp_space_around_binary_operators = before_and_after
117 csharp_space_around_declaration_statements = do_not_ignore
118 csharp_space_before_colon_in_inheritance_clause = true
119 csharp_space_before_comma = false
120 csharp_space_before_dot = false
121 csharp_space_before_open_square_brackets = false
122 csharp_space_before_semicolon_in_for_statement = false
123 csharp_space_between_empty_square_brackets = false
124 csharp_space_between_method_call_empty_parameter_list_parentheses = false
125 csharp_space_between_method_call_name_and_opening_parenthesis = false
126 csharp_space_between_method_call_parameter_list_parentheses = false
127 csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
128 csharp_space_between_method_declaration_name_and_open_parenthesis = false
129 csharp_space_between_method_declaration_parameter_list_parentheses = false
130 csharp_space_between_parentheses = false
131 csharp_space_between_square_brackets = false
132
133 [*.{asm,inc}]
134 indent_size = 8
135
136 # Xml project files
137 [*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
138 indent_size = 2
139
140 # Xml config files
141 [*.{props,targets,config,nuspec}]
142 indent_size = 2
143
144 [CMakeLists.txt]
145 indent_size = 2
146
147 [*.cmd]
148 indent_size = 2