-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.editorconfig
More file actions
55 lines (44 loc) · 2.04 KB
/
Copy path.editorconfig
File metadata and controls
55 lines (44 loc) · 2.04 KB
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
# EditorConfig is awesome: https://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.{md,yml,yaml,json}]
indent_size = 2
[*.{csproj,props,targets,sln}]
indent_size = 2
[*.cs]
# Visual Studio writes C# files as UTF-8 with a byte order mark, and this is what
# the repository already used. Declaring it keeps dotnet format and the IDE in step.
charset = utf-8-bom
# Organisation of using directives
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:suggestion
# Namespaces and braces
csharp_style_namespace_declarations = block_scoped:suggestion
csharp_new_line_before_open_brace = all
csharp_prefer_braces = true:suggestion
# Modifiers
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
dotnet_style_readonly_field = true:suggestion
# Expression level preferences
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
# Naming: private fields are prefixed with an underscore
dotnet_naming_rule.private_fields_with_underscore.severity = suggestion
dotnet_naming_rule.private_fields_with_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_with_underscore.style = underscore_camel_case
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.underscore_camel_case.required_prefix = _
dotnet_naming_style.underscore_camel_case.capitalization = camel_case