-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
63 lines (52 loc) · 2.2 KB
/
.editorconfig
File metadata and controls
63 lines (52 loc) · 2.2 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
56
57
58
59
60
61
62
63
root = true
[*]
indent_style = space
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
[*.cs]
indent_size = 4
[*.{csproj,props,targets,xml,json,yml,yaml}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.cs]
# Sort `using` directives, single group
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# C# language preferences
csharp_style_namespace_declarations = file_scoped:warning
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = false:silent
csharp_prefer_braces = true:warning
dotnet_style_require_accessibility_modifiers = omit_if_default:warning
csharp_prefer_braces = true:warning
# Always use explicit types, never var
csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = false:warning
csharp_style_var_elsewhere = false:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
# Allman braces
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
# Naming: private fields = _camelCase
dotnet_naming_rule.private_fields_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_underscore.style = underscore_prefix
dotnet_naming_rule.private_fields_underscore.severity = warning
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.underscore_prefix.required_prefix = _
dotnet_naming_style.underscore_prefix.capitalization = camel_case
# IDE0005 (unused usings) only fires in CLI builds when GenerateDocumentationFile=true.
# Re-promote to warning when issue #5 enables doc generation.
dotnet_diagnostic.IDE0005.severity = suggestion
# Test conventions: Method_Scenario_Outcome naming, xUnit-owned IDisposable
[**/*Tests.cs]
dotnet_diagnostic.CA1707.severity = none
dotnet_diagnostic.CA1816.severity = none