1+ root =true
2+ # top-most EditorConfig file
3+
4+ # Default settings:
5+ # A newline ending every file
6+ # Use 4 spaces as indentation
7+ [* ]
8+ insert_final_newline =true
9+ indent_style =space
10+ indent_size =4
11+ trim_trailing_whitespace =true
12+ end_of_line =crlf
13+ charset =utf-8
14+
15+ [project.json ]
16+ indent_size =2
17+
18+ # Generated code
19+ [* {_AssemblyInfo.cs,.notsupported.cs} ]
20+ generated_code =true
21+
22+ # Xml project files
23+ [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj} ]
24+ indent_size =2
25+
26+ [* .{csproj,vbproj,proj,nativeproj,locproj} ]
27+ charset =utf-8
28+
29+ # Xml build files
30+ [* .builds ]
31+ indent_size =2
32+
33+ # Xml files
34+ [* .{xml,stylecop,resx,ruleset} ]
35+ indent_size =2
36+
37+ # Xml config files
38+ [* .{props,targets,config,nuspec} ]
39+ indent_size =2
40+
41+ # YAML config files
42+ [* .{yml,yaml} ]
43+ indent_size =2
44+
45+ # Shell scripts
46+ [* .sh ]
47+ end_of_line =lf
48+ [* .{cmd,bat} ]
49+ end_of_line =crlf
50+
51+ [* .lock ]
52+ end_of_line =lf
53+
54+ # C# files
55+ [* .cs ]
56+ max_line_length =140
57+
58+ # New line preferences
59+ csharp_new_line_before_open_brace =all
60+ csharp_new_line_before_else =true
61+ csharp_new_line_before_catch =true
62+ csharp_new_line_before_finally =true
63+ csharp_new_line_before_members_in_object_initializers =true
64+ csharp_new_line_before_members_in_anonymous_types =true
65+ csharp_new_line_between_query_expression_clauses =true
66+
67+ # Indentation preferences
68+ csharp_indent_block_contents =true
69+ csharp_indent_braces =false
70+ csharp_indent_case_contents =true
71+ csharp_indent_case_contents_when_block =true
72+ csharp_indent_switch_labels =true
73+ csharp_indent_labels =one_less_than_current
74+
75+ # Modifier preferences
76+ csharp_preferred_modifier_order =public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
77+
78+ # avoid this. unless absolutely necessary
79+ dotnet_style_qualification_for_field =false :warning
80+ dotnet_style_qualification_for_property =false :error
81+ dotnet_style_qualification_for_method =false :warning
82+ dotnet_style_qualification_for_event =false :warning
83+
84+ # Types: use keywords instead of BCL types, and prefer var
85+ csharp_style_var_elsewhere =true :suggestion
86+ csharp_style_var_for_built_in_types =true :suggestion
87+ csharp_style_var_when_type_is_apparent =true :suggestion
88+ dotnet_style_predefined_type_for_locals_parameters_members =true :suggestion
89+ dotnet_style_predefined_type_for_member_access =true :suggestion
90+
91+ # name all constant fields using ALL_UPPER
92+ dotnet_naming_rule.constant_fields_should_be_all_upper.severity =suggestion
93+ dotnet_naming_rule.constant_fields_should_be_all_upper.symbols =constant_fields
94+ dotnet_naming_rule.constant_fields_should_be_all_upper.style =consts_style
95+ dotnet_naming_symbols.constant_fields.applicable_kinds =field
96+ dotnet_naming_symbols.constant_fields.required_modifiers =const
97+ dotnet_naming_symbols.constant_fields.applicable_accessibilities =private, internal, private_protected
98+ dotnet_naming_style.consts_style.capitalization =all_upper
99+ dotnet_naming_style.consts_style.word_separator =_
100+
101+ # static fields should have s_ prefix
102+ dotnet_naming_rule.static_fields_should_have_prefix.severity =suggestion
103+ dotnet_naming_rule.static_fields_should_have_prefix.symbols =static_fields
104+ dotnet_naming_rule.static_fields_should_have_prefix.style =static_prefix_style
105+ dotnet_naming_symbols.static_fields.applicable_kinds =field
106+ dotnet_naming_symbols.static_fields.required_modifiers =static
107+ dotnet_naming_symbols.static_fields.applicable_accessibilities =private, internal, private_protected
108+ dotnet_naming_style.static_prefix_style.required_prefix =s_
109+ dotnet_naming_style.static_prefix_style.capitalization =camel_case
110+
111+ # internal and private fields should be _camelCase
112+ dotnet_naming_rule.camel_case_for_private_internal_fields.severity =suggestion
113+ dotnet_naming_rule.camel_case_for_private_internal_fields.symbols =private_internal_fields
114+ dotnet_naming_rule.camel_case_for_private_internal_fields.style =camel_case_underscore_style
115+ dotnet_naming_symbols.private_internal_fields.applicable_kinds =field
116+ dotnet_naming_symbols.private_internal_fields.applicable_accessibilities =private, internal
117+ dotnet_naming_style.camel_case_underscore_style.required_prefix =_
118+ dotnet_naming_style.camel_case_underscore_style.capitalization =camel_case
119+
120+ # Code style defaults
121+ csharp_using_directive_placement =outside_namespace:suggestion
122+ dotnet_sort_system_directives_first =true
123+ csharp_prefer_braces =true :silent
124+ csharp_preserve_single_line_blocks =true :none
125+ csharp_preserve_single_line_statements =false :none
126+ csharp_prefer_static_local_function =true :suggestion
127+ csharp_prefer_simple_using_statement =false :none
128+ csharp_style_prefer_switch_expression =true :suggestion
129+
130+ # Code quality
131+ dotnet_style_readonly_field =true :warning
132+ dotnet_code_quality_unused_parameters =non_public:warning
133+
134+ # Expression-level preferences
135+ dotnet_style_object_initializer =true :suggestion
136+ dotnet_style_collection_initializer =true :suggestion
137+ dotnet_style_explicit_tuple_names =true :suggestion
138+ dotnet_style_coalesce_expression =true :suggestion
139+ dotnet_style_null_propagation =true :suggestion
140+ dotnet_style_prefer_is_null_check_over_reference_equality_method =true :suggestion
141+ dotnet_style_prefer_inferred_tuple_names =true :suggestion
142+ dotnet_style_prefer_inferred_anonymous_type_member_names =true :suggestion
143+ dotnet_style_prefer_auto_properties =true :suggestion
144+ dotnet_style_prefer_conditional_expression_over_assignment =true :silent
145+ dotnet_style_prefer_conditional_expression_over_return =true :silent
146+ csharp_prefer_simple_default_expression =true :suggestion
147+
148+ # Expression-bodied members
149+ csharp_style_expression_bodied_methods =true :silent
150+ csharp_style_expression_bodied_constructors =true :silent
151+ csharp_style_expression_bodied_operators =true :silent
152+ csharp_style_expression_bodied_properties =true :silent
153+ csharp_style_expression_bodied_indexers =true :silent
154+ csharp_style_expression_bodied_accessors =true :silent
155+ csharp_style_expression_bodied_lambdas =true :silent
156+ csharp_style_expression_bodied_local_functions =true :silent
157+
158+ # Pattern matching
159+ csharp_style_pattern_matching_over_is_with_cast_check =true :suggestion
160+ csharp_style_pattern_matching_over_as_with_null_check =true :suggestion
161+ csharp_style_inlined_variable_declaration =true :suggestion
162+
163+ # Null checking preferences
164+ csharp_style_throw_expression =true :suggestion
165+ csharp_style_conditional_delegate_call =true :suggestion
166+
167+ # Other features
168+ csharp_style_prefer_index_operator =false :none
169+ csharp_style_prefer_range_operator =false :none
170+ csharp_style_pattern_local_over_anonymous_function =false :none
171+
172+ # Space preferences
173+ csharp_space_after_cast =false
174+ csharp_space_after_colon_in_inheritance_clause =true
175+ csharp_space_after_comma =true
176+ csharp_space_after_dot =false
177+ csharp_space_after_keywords_in_control_flow_statements =true
178+ csharp_space_after_semicolon_in_for_statement =true
179+ csharp_space_around_binary_operators =before_and_after
180+ csharp_space_around_declaration_statements =do_not_ignore
181+ csharp_space_before_colon_in_inheritance_clause =true
182+ csharp_space_before_comma =false
183+ csharp_space_before_dot =false
184+ csharp_space_before_open_square_brackets =false
185+ csharp_space_before_semicolon_in_for_statement =false
186+ csharp_space_between_empty_square_brackets =false
187+ csharp_space_between_method_call_empty_parameter_list_parentheses =false
188+ csharp_space_between_method_call_name_and_opening_parenthesis =false
189+ csharp_space_between_method_call_parameter_list_parentheses =false
190+ csharp_space_between_method_declaration_empty_parameter_list_parentheses =false
191+ csharp_space_between_method_declaration_name_and_open_parenthesis =false
192+ csharp_space_between_method_declaration_parameter_list_parentheses =false
193+ csharp_space_between_parentheses =false
194+ csharp_space_between_square_brackets =false
195+
196+ # Analyzers
197+ dotnet_code_quality.ca1802.api_surface =private, internal
198+ dotnet_code_quality.ca1822.api_surface =private, internal
199+ dotnet_code_quality.ca2208.api_surface =public
200+
201+ # CA1822: Mark members as static
202+ dotnet_diagnostic.ca1822.severity =none
203+
204+ # License header
205+ file_header_template = Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: Apache-2.0
206+
207+ # ReSharper properties
208+ resharper_braces_for_for =required
209+ resharper_braces_for_foreach =required
210+ resharper_braces_for_ifelse =required_for_multiline
211+ resharper_braces_for_while =required
212+ resharper_braces_redundant =false
213+ resharper_csharp_wrap_arguments_style =chop_if_long
214+ resharper_csharp_wrap_lines =false
215+ resharper_csharp_wrap_parameters_style =chop_if_long
216+ resharper_enforce_line_ending_style =true
217+ resharper_max_initializer_elements_on_line =1
218+ resharper_space_before_foreach_parentheses =true
219+ resharper_space_before_if_parentheses =true
220+ resharper_space_within_single_line_array_initializer_braces =true
221+ resharper_use_indent_from_vs =false
222+ resharper_wrap_after_declaration_lpar =true
223+ resharper_wrap_object_and_collection_initializer_style =chop_always
224+
225+
226+ # ReSharper inspection severities
227+ # https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
228+ resharper_arrange_redundant_parentheses_highlighting =hint
229+ resharper_arrange_this_qualifier_highlighting =error
230+ resharper_arrange_type_member_modifiers_highlighting =hint
231+ resharper_arrange_type_modifiers_highlighting =hint
232+ resharper_built_in_type_reference_style_for_member_access_highlighting =hint
233+ resharper_built_in_type_reference_style_highlighting =hint
234+ resharper_ca1031_highlighting =suggestion
235+ resharper_ca1308_highlighting =none
236+ resharper_ca2007_highlighting =none
237+ resharper_convert_closure_to_method_group_highlighting =hint
238+ resharper_convert_to_static_class_highlighting =none
239+ resharper_member_can_be_made_static_global_highlighting =none
240+ resharper_member_can_be_made_static_local_highlighting =none
241+ resharper_redundant_base_qualifier_highlighting =warning
242+ resharper_suggest_var_or_type_built_in_types_highlighting =hint
243+ resharper_suggest_var_or_type_elsewhere_highlighting =hint
244+ resharper_suggest_var_or_type_simple_types_highlighting =hint
245+ resharper_web_config_module_not_resolved_highlighting =warning
246+ resharper_web_config_type_not_resolved_highlighting =warning
247+ resharper_web_config_wrong_module_highlighting =warning
0 commit comments