1+ root = true
2+
3+ [* ]
4+ charset = utf-8
5+ end_of_line = crlf
6+ indent_style = space
7+ indent_size = 4
8+ insert_final_newline = true
9+ trim_trailing_whitespace = true
10+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
11+ tab_width = 4
12+ dotnet_style_coalesce_expression = true :none
13+ dotnet_style_null_propagation = true :error
14+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
15+ dotnet_style_prefer_auto_properties = true :silent
16+ dotnet_style_object_initializer = true :error
17+ dotnet_style_collection_initializer = true :suggestion
18+ dotnet_style_prefer_simplified_boolean_expressions = true :suggestion
19+ dotnet_style_prefer_conditional_expression_over_assignment = false :silent
20+ dotnet_style_prefer_conditional_expression_over_return = false :silent
21+ dotnet_style_explicit_tuple_names = true :error
22+ dotnet_style_prefer_inferred_tuple_names = true :suggestion
23+ dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
24+ dotnet_style_prefer_compound_assignment = true :suggestion
25+ dotnet_style_prefer_simplified_interpolation = true :suggestion
26+ dotnet_style_namespace_match_folder = true :suggestion
27+ dotnet_style_prefer_collection_expression = when_types_exactly_match:suggestion
28+
29+ [* .{json,xml,config,yml,csproj} ]
30+ indent_size = 2
31+
32+ [* .md ]
33+ trim_trailing_whitespace = false
34+
35+ [* .cs ]
36+ # See https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
37+ # Language Conventions
38+
39+ # # .NET Code Style Settings
40+ dotnet_style_coalesce_expression = true :none
41+ dotnet_style_collection_initializer = true :suggestion
42+ dotnet_style_explicit_tuple_names = true :error
43+ dotnet_style_null_propagation = true :error
44+ dotnet_style_object_initializer = true :error
45+ dotnet_style_predefined_type_for_locals_parameters_members = true :error
46+ dotnet_style_predefined_type_for_member_access = true :error
47+ dotnet_style_qualification_for_event = false :error
48+ dotnet_style_qualification_for_field = false :error
49+ dotnet_style_qualification_for_method = false :error
50+ dotnet_style_qualification_for_property = false :error
51+
52+ # # C# Code Style Settings
53+ csharp_prefer_braces = true :suggestion
54+ csharp_prefer_simple_default_expression = true :error
55+ csharp_style_conditional_delegate_call = true :error
56+ csharp_style_expression_bodied_accessors = true :error
57+ csharp_style_expression_bodied_constructors = false :suggestion
58+ csharp_style_expression_bodied_indexers = true :error
59+ csharp_style_expression_bodied_methods = false :suggestion
60+ csharp_style_expression_bodied_operators = true :error
61+ csharp_style_expression_bodied_properties = true :error
62+ csharp_style_inlined_variable_declaration = true :suggestion
63+ csharp_style_pattern_matching_over_as_with_null_check = true :error
64+ csharp_style_pattern_matching_over_is_with_cast_check = true :error
65+ csharp_style_throw_expression = false :error
66+ csharp_style_var_elsewhere = false :warning
67+ csharp_style_var_for_built_in_types = false :error
68+ csharp_style_var_when_type_is_apparent = true :error
69+ csharp_style_namespace_declarations = file_scoped:warning
70+ csharp_style_prefer_primary_constructors = false :suggestion
71+ csharp_style_prefer_null_check_over_type_check = true :suggestion
72+ csharp_style_prefer_local_over_anonymous_function = true :suggestion
73+ csharp_style_deconstructed_variable_declaration = true :suggestion
74+
75+
76+ # Formatting Rules
77+
78+ # # .NET Formatting Settings
79+ dotnet_sort_system_directives_first = true
80+
81+ # # C# Formatting Settings
82+ csharp_indent_block_contents = true
83+ csharp_indent_braces = false
84+ csharp_indent_case_contents = true
85+ csharp_indent_labels = no_change
86+ csharp_indent_switch_labels = true
87+ csharp_new_line_before_catch = true
88+ csharp_new_line_before_else = true
89+ csharp_new_line_before_finally = true
90+ csharp_new_line_before_members_in_anonymous_types = true
91+ csharp_new_line_before_members_in_object_initializers = true
92+ csharp_new_line_before_open_brace = all
93+ csharp_new_line_between_query_expression_clauses = true
94+ csharp_preserve_single_line_blocks = true
95+ csharp_preserve_single_line_statements = false
96+
97+ # ## Space preferences
98+ csharp_space_after_cast = true
99+ csharp_space_after_colon_in_inheritance_clause = true
100+ csharp_space_after_comma = true
101+ csharp_space_after_dot = false
102+ csharp_space_after_keywords_in_control_flow_statements = true
103+ csharp_space_after_semicolon_in_for_statement = true
104+ csharp_space_around_binary_operators = before_and_after
105+ csharp_space_around_declaration_statements = do_not_ignore
106+ csharp_space_before_colon_in_inheritance_clause = true
107+ csharp_space_before_comma = false
108+ csharp_space_before_dot = false
109+ csharp_space_before_open_square_brackets = false
110+ csharp_space_before_semicolon_in_for_statement = false
111+ csharp_space_between_empty_square_brackets = false
112+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
113+ csharp_space_between_method_call_name_and_opening_parenthesis = false
114+ csharp_space_between_method_call_parameter_list_parentheses = false
115+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
116+ csharp_space_between_method_declaration_name_and_open_parenthesis = false
117+ csharp_space_between_method_declaration_parameter_list_parentheses = false
118+ csharp_space_between_parentheses = false
119+ csharp_space_between_square_brackets = false
120+
121+
122+ # Naming Conventions
123+
124+ # # Interface should begin with I
125+ dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
126+ dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
127+ dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
128+
129+ dotnet_naming_symbols.interface.applicable_kinds = interface
130+ dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
131+ dotnet_naming_symbols.interface.required_modifiers =
132+
133+ dotnet_naming_style.begins_with_i.required_prefix = I
134+ dotnet_naming_style.begins_with_i.required_suffix =
135+ dotnet_naming_style.begins_with_i.word_separator =
136+ dotnet_naming_style.begins_with_i.capitalization = pascal_case
137+
138+ # # Types should be pascal case
139+ dotnet_naming_rule.types_should_be_pascal_case.severity = error
140+ dotnet_naming_rule.types_should_be_pascal_case.symbols = types
141+ dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
142+
143+ dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
144+ dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
145+ dotnet_naming_symbols.types.required_modifiers =
146+
147+ dotnet_naming_style.pascal_case.required_prefix =
148+ dotnet_naming_style.pascal_case.required_suffix =
149+ dotnet_naming_style.pascal_case.word_separator =
150+ dotnet_naming_style.pascal_case.capitalization = pascal_case
151+
152+ # # Non field members should be pascal case
153+ dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = error
154+ dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
155+ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
156+
157+ dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
158+ dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
159+ dotnet_naming_symbols.non_field_members.required_modifiers =
160+
161+ # # Private fields should begin with an underscore and be in camel case
162+ dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.symbols = private_fields
163+ dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.style = require_underscore_prefix_and_camel_case
164+ dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.severity = error
165+
166+ dotnet_naming_symbols.private_fields.applicable_kinds = field
167+ dotnet_naming_symbols.private_fields.applicable_accessibilities = private
168+
169+ dotnet_naming_style.require_underscore_prefix_and_camel_case.required_prefix = _
170+ dotnet_naming_style.require_underscore_prefix_and_camel_case.capitalization = camel_case
171+
172+ # IDE1006: Naming Styles
173+ dotnet_diagnostic.IDE1006.severity = none
174+ max_line_length = 160
175+ csharp_using_directive_placement = outside_namespace:silent
176+ csharp_prefer_simple_using_statement = true :suggestion
177+ csharp_style_prefer_method_group_conversion = true :silent
178+ csharp_style_prefer_top_level_statements = true :silent
179+ csharp_style_expression_bodied_lambdas = true :silent
180+ csharp_style_expression_bodied_local_functions = false :silent
181+
182+ # CS1591: Missing XML comment for publicly visible type or member
183+ dotnet_diagnostic.CS1591.severity = none
184+
185+ # CA1034: Nested types should not be visible
186+ dotnet_diagnostic.CA1034.severity = none
187+
188+ # CA1812: Avoid uninstantiated internal classes
189+ dotnet_diagnostic.CA1812.severity = none
190+
191+ # IDE0058: Expression value is never used
192+ dotnet_diagnostic.IDE0058.severity = none
193+
194+ # CA1515: Consider making public types internal
195+ dotnet_diagnostic.CA1515.severity = none
196+
197+ # IDE0079: Remove unnecessary suppression
198+ dotnet_diagnostic.IDE0079.severity = none
199+
200+ # Generated service connection code rules
201+ [** /Connected Services/** /Reference.cs ]
202+ dotnet_diagnostic.CS8981.severity = none
203+
204+ # EF Core Migration files
205+ [** /Migrations/* .cs ]
206+ csharp_style_namespace_declarations = block_scoped:none
207+
208+ # CA1062: Validate arguments of public methods
209+ dotnet_diagnostic.CA1062.severity = none
210+
211+ # Tests
212+ [** /* {Tests,Test}.cs ]
213+ # CA1707: Identifiers should not contain underscores
214+ dotnet_diagnostic.CA1707.severity = none
215+
216+ # CA2234: Pass system uri objects instead of strings
217+ dotnet_diagnostic.CA2234.severity = none
218+
219+ [** /* {Tests,Test}.* .cs ]
220+ # CA1707: Identifiers should not contain underscores
221+ dotnet_diagnostic.CA1707.severity = none
222+
223+ # CA2234: Pass system uri objects instead of strings
224+ dotnet_diagnostic.CA2234.severity = none
225+
226+ [** /{Tests,Test}/** /* .cs ]
227+ # CA1707: Identifiers should not contain underscores
228+ dotnet_diagnostic.CA1707.severity = none
229+
230+ # CA2234: Pass system uri objects instead of strings
231+ dotnet_diagnostic.CA2234.severity = none
232+
233+ [* .cs ]
234+ # Ignored due to their breaking nature
235+
236+ # CA1002: Do not expose generic lists
237+ dotnet_diagnostic.CA1002.severity = none
238+
239+ # CA2227: Collection properties should be read only
240+ dotnet_diagnostic.CA2227.severity = none
241+
242+ # CA1056: URI-like properties should not be strings
243+ dotnet_diagnostic.CA1056.severity = none
244+
245+ # CA1055: URI-like return values should not be strings
246+ dotnet_diagnostic.CA1055.severity = none
247+
248+ # CA1054: URI-like parameters should not be strings
249+ dotnet_diagnostic.CA1054.severity = none
250+
251+ # CA1848: Use the LoggerMessage delegates [TODO: Make a migration to use LoggerMessage]
252+ dotnet_diagnostic.CA1848.severity = none
0 commit comments