-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.editorconfig
60 lines (47 loc) · 2.18 KB
/
.editorconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# top-most EditorConfig file
root = true
# C# files
[*.cs]
indent_style = space
indent_size = 4
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
# Organize usings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = true
# C# specific formatting rules
# Use 'var' instead of explicit type when the type is apparent
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = false:suggestion
# Use expression-bodied members when possible
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
# Use pattern matching when possible
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
# Prefer 'is not null' over '!= null'
csharp_style_prefer_is_not_expression = true:suggestion
# Prefer 'null' check over 'object' check
csharp_style_prefer_null_check_over_type_check = true:suggestion
# Use 'default' literal instead of 'default(T)'
csharp_style_prefer_simple_default_expression = true:suggestion
# Use 'nameof' instead of string literals for parameter names
csharp_style_prefer_nameof_expression = true:suggestion
# Use 'using' statement instead of 'using' declaration
csharp_prefer_simple_using_statement = true:suggestion
# Use 'readonly' modifier for fields that are only assigned in the constructor
dotnet_style_readonly_field = true:suggestion
# Use 'this.' prefix for instance members
dotnet_style_qualification_for_field = true:suggestion
dotnet_style_qualification_for_property = true:suggestion
dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_event = true:suggestion
# Use 'private' modifier for fields
dotnet_style_require_accessibility_modifiers = always:suggestion