Repository navigation
Expand file tree
/
Copy path.editorconfig
More file actions
43 lines (37 loc) · 1.65 KB
/
Copy path.editorconfig
File metadata and controls
43 lines (37 loc) · 1.65 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
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.{yml,yaml,json,props,targets,csproj,slnx}]
indent_size = 2
[*.cs]
csharp_style_namespace_declarations = file_scoped
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true
csharp_style_expression_bodied_methods = when_on_single_line
csharp_style_expression_bodied_properties = true
csharp_style_expression_bodied_accessors = true
csharp_prefer_braces = when_multiline
csharp_style_prefer_switch_expression = true
csharp_style_throw_expression = true
dotnet_style_null_propagation = true
dotnet_style_coalesce_expression = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_object_initializer = true
dotnet_style_collection_initializer = true
dotnet_style_readonly_field = true
dotnet_naming_rule.private_fields_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_underscore.style = underscore_prefixed
dotnet_naming_rule.private_fields_underscore.severity = suggestion
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.underscore_prefixed.required_prefix = _
dotnet_naming_style.underscore_prefixed.capitalization = camel_case
# EnforceCodeStyleInBuild is on, so style rules run during the build. Keeping them advisory means
# a formatting preference can never be the reason CI goes red.
dotnet_analyzer_diagnostic.category-Style.severity = suggestion