@@ -5,237 +5,52 @@ root = true
55
66# All files
77[* ]
8- charset = utf-8
8+ indent_style = space
99insert_final_newline = true
1010trim_trailing_whitespace = true
11- indent_style = space
11+ charset = utf-8
1212
1313# Code files
1414[* .{cs,csx,vb,vbx} ]
1515indent_size = 4
1616
17- # XML project files
18- [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
19- indent_size = 2
20-
21- # XML config files
22- [* .{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct} ]
23- indent_size = 2
24-
25- # JSON files
26- [* .json ]
27- indent_size = 2
28-
29- # YAML files
30- [* .{yml,yaml} ]
31- indent_size = 2
32-
33- # Shell scripts
34- [* .sh ]
35- end_of_line = lf
36-
37- # Markdown files
38- [* .md ]
39- trim_trailing_whitespace = false
40-
41- # TypeScript/JavaScript files
42- [* .{ts,tsx,js,jsx} ]
43- indent_size = 2
44-
4517# C# files
4618[* .cs ]
47-
4819# New line preferences
4920csharp_new_line_before_open_brace = all
5021csharp_new_line_before_else = true
5122csharp_new_line_before_catch = true
5223csharp_new_line_before_finally = true
5324csharp_new_line_before_members_in_object_initializers = true
5425csharp_new_line_before_members_in_anonymous_types = true
55- csharp_new_line_between_query_expression_clauses = true
5626
5727# Indentation preferences
5828csharp_indent_case_contents = true
5929csharp_indent_switch_labels = true
60- csharp_indent_labels = one_less_than_current
61- csharp_indent_block_contents = true
62- csharp_indent_braces = false
63- csharp_indent_case_contents_when_block = false
64-
65- # Space preferences
66- csharp_space_after_cast = false
67- csharp_space_after_keywords_in_control_flow_statements = true
68- csharp_space_between_parentheses = false
69- csharp_space_before_colon_in_inheritance_clause = true
70- csharp_space_after_colon_in_inheritance_clause = true
71- csharp_space_around_binary_operators = before_and_after
72- csharp_space_between_method_declaration_parameter_list_parentheses = false
73- csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
74- csharp_space_between_method_declaration_name_and_open_parenthesis = false
75- csharp_space_between_method_call_parameter_list_parentheses = false
76- csharp_space_between_method_call_empty_parameter_list_parentheses = false
77- csharp_space_between_method_call_name_and_opening_parenthesis = false
78- csharp_space_after_comma = true
79- csharp_space_before_comma = false
80- csharp_space_after_dot = false
81- csharp_space_before_dot = false
82- csharp_space_after_semicolon_in_for_statement = true
83- csharp_space_before_semicolon_in_for_statement = false
84- csharp_space_around_declaration_statements = false
85- csharp_space_before_open_square_brackets = false
86- csharp_space_between_empty_square_brackets = false
87- csharp_space_between_square_brackets = false
88-
89- # Organize usings
90- dotnet_sort_system_directives_first = true
91- dotnet_separate_import_directive_groups = false
92-
93- # this. preferences
94- dotnet_style_qualification_for_field = false :warning
95- dotnet_style_qualification_for_property = false :warning
96- dotnet_style_qualification_for_method = false :warning
97- dotnet_style_qualification_for_event = false :warning
98-
99- # Language keywords vs BCL types preferences
100- dotnet_style_predefined_type_for_locals_parameters_members = true :warning
101- dotnet_style_predefined_type_for_member_access = true :warning
10230
103- # Parentheses preferences
104- dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
105- dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
106- dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
107- dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
31+ # Suppress SA1636 (file header copyright mismatch) - our copyright format is correct
32+ dotnet_diagnostic.SA1636.severity = none
10833
109- # Modifier preferences
110- dotnet_style_require_accessibility_modifiers = always:warning
111- dotnet_style_readonly_field = true :warning
112- csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
113-
114- # Expression-level preferences
115- dotnet_style_object_initializer = true :suggestion
116- dotnet_style_collection_initializer = true :suggestion
117- dotnet_style_explicit_tuple_names = true :warning
118- dotnet_style_prefer_inferred_tuple_names = true :suggestion
119- dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
120- dotnet_style_prefer_auto_properties = true :suggestion
121- dotnet_style_prefer_conditional_expression_over_assignment = true :suggestion
122- dotnet_style_prefer_conditional_expression_over_return = true :suggestion
123- dotnet_style_prefer_compound_assignment = true :suggestion
124- dotnet_style_prefer_simplified_interpolation = true :suggestion
125- dotnet_style_prefer_simplified_boolean_expressions = true :suggestion
126-
127- # Null-checking preferences
128- dotnet_style_coalesce_expression = true :warning
129- dotnet_style_null_propagation = true :warning
130- dotnet_style_prefer_is_null_check_over_reference_equality_method = true :warning
131-
132- # var preferences
133- csharp_style_var_for_built_in_types = true :suggestion
134- csharp_style_var_when_type_is_apparent = true :suggestion
135- csharp_style_var_elsewhere = true :suggestion
136-
137- # Expression-bodied members
138- csharp_style_expression_bodied_methods = when_on_single_line:suggestion
139- csharp_style_expression_bodied_constructors = false :suggestion
140- csharp_style_expression_bodied_operators = when_on_single_line:suggestion
141- csharp_style_expression_bodied_properties = when_on_single_line:suggestion
142- csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
143- csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
144- csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
145- csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
146-
147- # Pattern matching preferences
148- csharp_style_pattern_matching_over_is_with_cast_check = true :warning
149- csharp_style_pattern_matching_over_as_with_null_check = true :warning
150- csharp_style_prefer_switch_expression = true :suggestion
151- csharp_style_prefer_pattern_matching = true :suggestion
152- csharp_style_prefer_not_pattern = true :suggestion
153-
154- # Code block preferences
155- csharp_prefer_braces = true :warning
156- csharp_prefer_simple_using_statement = true :suggestion
157-
158- # Using directive preferences
159- csharp_using_directive_placement = outside_namespace:warning
160-
161- # Naming conventions
162-
163- # Constant fields are PascalCase
164- dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
165- dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
166- dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
167- dotnet_naming_symbols.constant_fields.applicable_kinds = field
168- dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
169- dotnet_naming_symbols.constant_fields.required_modifiers = const
170- dotnet_naming_style.pascal_case_style.capitalization = pascal_case
171-
172- # Static fields are PascalCase
173- dotnet_naming_rule.static_fields_should_be_pascal_case.severity = warning
174- dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields
175- dotnet_naming_rule.static_fields_should_be_pascal_case.style = pascal_case_style
176- dotnet_naming_symbols.static_fields.applicable_kinds = field
177- dotnet_naming_symbols.static_fields.applicable_accessibilities = *
178- dotnet_naming_symbols.static_fields.required_modifiers = static
179-
180- # Private fields are _camelCase
181- dotnet_naming_rule.private_fields_should_be_camel_case_with_underscore.severity = warning
182- dotnet_naming_rule.private_fields_should_be_camel_case_with_underscore.symbols = private_fields
183- dotnet_naming_rule.private_fields_should_be_camel_case_with_underscore.style = camel_case_with_underscore_style
184- dotnet_naming_symbols.private_fields.applicable_kinds = field
185- dotnet_naming_symbols.private_fields.applicable_accessibilities = private
186- dotnet_naming_style.camel_case_with_underscore_style.capitalization = camel_case
187- dotnet_naming_style.camel_case_with_underscore_style.required_prefix = _
188-
189- # Local variables are camelCase
190- dotnet_naming_rule.local_variables_should_be_camel_case.severity = warning
191- dotnet_naming_rule.local_variables_should_be_camel_case.symbols = local_variables
192- dotnet_naming_rule.local_variables_should_be_camel_case.style = camel_case_style
193- dotnet_naming_symbols.local_variables.applicable_kinds = local
194- dotnet_naming_style.camel_case_style.capitalization = camel_case
195-
196- # Interfaces must be PascalCase and have an I prefix
197- dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.severity = warning
198- dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.symbols = interfaces
199- dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.style = pascal_case_with_i_prefix_style
200- dotnet_naming_symbols.interfaces.applicable_kinds = interface
201- dotnet_naming_style.pascal_case_with_i_prefix_style.capitalization = pascal_case
202- dotnet_naming_style.pascal_case_with_i_prefix_style.required_prefix = I
203-
204- # Types must be PascalCase
205- dotnet_naming_rule.types_should_be_pascal_case.severity = warning
206- dotnet_naming_rule.types_should_be_pascal_case.symbols = types
207- dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case_style
208- dotnet_naming_symbols.types.applicable_kinds = class,struct,enum,delegate
209-
210- # Non-field members must be PascalCase
211- dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
212- dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
213- dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case_style
214- dotnet_naming_symbols.non_field_members.applicable_kinds = property,event,method
215-
216- # Async methods should end with Async
217- dotnet_naming_rule.async_methods_should_end_with_async.severity = warning
218- dotnet_naming_rule.async_methods_should_end_with_async.symbols = async_methods
219- dotnet_naming_rule.async_methods_should_end_with_async.style = end_with_async_style
220- dotnet_naming_symbols.async_methods.applicable_kinds = method
221- dotnet_naming_symbols.async_methods.required_modifiers = async
222- dotnet_naming_style.end_with_async_style.capitalization = pascal_case
223- dotnet_naming_style.end_with_async_style.required_suffix = Async
224-
225- # CA1031: Do not catch general exception types
226- dotnet_diagnostic.CA1031.severity = none
34+ # JSON files
35+ [* .json ]
36+ indent_size = 2
22737
228- # CA1062: Validate arguments of public methods
229- dotnet_diagnostic.CA1062.severity = none
38+ # XML files
39+ [* .{xml,config,props,targets,nuspec,resx,ruleset} ]
40+ indent_size = 2
23041
231- # CA1848: Use LoggerMessage delegates
232- dotnet_diagnostic.CA1848.severity = none
42+ # YAML files
43+ [* .{yml,yaml} ]
44+ indent_size = 2
23345
234- # CA2007: Consider calling ConfigureAwait on the awaited task
235- dotnet_diagnostic.CA2007.severity = none
46+ # Markdown files
47+ [* .md ]
48+ trim_trailing_whitespace = false
23649
237- # IDE0058: Expression value is never used
238- dotnet_diagnostic.IDE0058.severity = none
50+ # Web files
51+ [* .{htm,html,js,ts,tsx,jsx,css,scss,less} ]
52+ indent_size = 2
23953
240- # CS8618: Non-nullable field must contain a non-null value when exiting constructor
241- dotnet_diagnostic.CS8618.severity = suggestion
54+ # Shell scripts
55+ [* .sh ]
56+ end_of_line = lf
0 commit comments