Repository navigation
Expand file tree
/
Copy path.editorconfig
More file actions
55 lines (42 loc) · 1.76 KB
/
Copy path.editorconfig
File metadata and controls
55 lines (42 loc) · 1.76 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
root = true
[*]
charset = utf-8
end_of_line = crlf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{md,markdown}]
trim_trailing_whitespace = false
[*.{json,jsonl,yml,yaml}]
indent_size = 2
[*.{axaml,xaml,csproj,props,targets,manifest,slnx}]
indent_size = 2
[*.cs]
indent_size = 4
# Namespaces and usings
csharp_style_namespace_declarations = file_scoped:error
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:error
# Expression preferences
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_prefer_braces = true:suggestion
# Nullability and modern language use
csharp_style_prefer_pattern_matching = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
# Naming: private fields are _camelCase
dotnet_naming_rule.private_fields_underscore.severity = error
dotnet_naming_rule.private_fields_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_underscore.style = underscore_prefix
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_fields.required_modifiers =
dotnet_naming_style.underscore_prefix.required_prefix = _
dotnet_naming_style.underscore_prefix.capitalization = camel_case
# Public API must be documented; Core is a library the rest of the app reads.
dotnet_diagnostic.CS1591.severity = suggestion
[tests/**/*.cs]
# Test method names read as sentences, not identifiers.
dotnet_diagnostic.CA1707.severity = none