Skip to content

Commit 3816e43

Browse files
committed
Sort to match rabbitmq-dotnet-client, add doc links
1 parent a487474 commit 3816e43

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.editorconfig

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,35 @@ csharp_indent_braces = false
2525
csharp_indent_case_contents = true
2626
csharp_indent_case_contents_when_block = true
2727
csharp_indent_switch_labels = true
28-
csharp_indent_labels = flush_left
28+
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#csharp_indent_labels
29+
csharp_indent_labels = one_less_than_current
2930

3031
# Modifier preferences
3132
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036
3233
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
3334

3435
# avoid this. unless absolutely necessary
35-
dotnet_style_qualification_for_field = false:suggestion
36-
dotnet_style_qualification_for_property = false:suggestion
37-
dotnet_style_qualification_for_method = false:suggestion
38-
dotnet_style_qualification_for_event = false:suggestion
39-
40-
# Sort using and Import directives with System.* appearing first
41-
dotnet_sort_system_directives_first = true
42-
dotnet_separate_import_directive_groups = false
36+
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009
37+
dotnet_style_qualification_for_field = false:error
38+
dotnet_style_qualification_for_property = false:error
39+
dotnet_style_qualification_for_method = false:error
40+
dotnet_style_qualification_for_event = false:error
4341

42+
# Types: use keywords instead of BCL types, and permit var only when the type is clear
43+
# Prefer "var" everywhere
44+
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008
45+
dotnet_diagnostic.IDE0007.severity = error
46+
csharp_style_var_for_built_in_types = true:error
47+
csharp_style_var_when_type_is_apparent = true:error
48+
csharp_style_var_elsewhere = true:error
4449
# Use language keywords instead of framework type names for type references
4550
dotnet_style_predefined_type_for_locals_parameters_members = true:error
4651
dotnet_style_predefined_type_for_member_access = true:error
4752

53+
# Sort using and Import directives with System.* appearing first
54+
dotnet_sort_system_directives_first = true
55+
dotnet_separate_import_directive_groups = false
56+
4857
# Suggest more modern language features when available
4958
dotnet_style_object_initializer = true:suggestion
5059
dotnet_style_collection_initializer = true:suggestion
@@ -202,12 +211,6 @@ csharp_style_allow_embedded_statements_on_same_line_experimental = false
202211
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
203212
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
204213

205-
# Prefer "var" everywhere
206-
dotnet_diagnostic.IDE0007.severity = error
207-
csharp_style_var_for_built_in_types = true:error
208-
csharp_style_var_when_type_is_apparent = true:error
209-
csharp_style_var_elsewhere = true:error
210-
211214
# Prefer method-like constructs to have a block body
212215
csharp_style_expression_bodied_methods = false:none
213216
csharp_style_expression_bodied_constructors = false:none

0 commit comments

Comments
 (0)