-
Notifications
You must be signed in to change notification settings - Fork 0
/
.editorconfig
70 lines (55 loc) · 2.72 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
61
62
63
64
65
66
67
68
69
70
# Consider this the top-most .editorconfig file
root = true
[*]
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.yml]
indent_size = 2
# Line endings enforced by SonarQube
end_of_line = lf
[*.cs]
indent_size = 4
charset = utf-8
[*.csproj]
indent_size = 2
# .NET settings
[*.cs]
dotnet_sort_system_directives_first = true
# Use language keywords instead of framework types (eg: Int32 -> int)
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_naming_style.camel_case_underscore_prefix.capitalization = camel_case
dotnet_naming_style.camel_case_underscore_prefix.required_prefix = _
# Private fields should be camel case and prefixed with _
dotnet_naming_rule.private_fields_should_start_with_underscore_camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_start_with_underscore_camelcase.style = camel_case_underscore_prefix
dotnet_naming_rule.private_fields_should_start_with_underscore_camelcase.severity = suggestion
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const
# Use PascalCase for static readonly fields
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols = static_readonly_fields
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = *
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
# CSharp settings
[*.cs]
csharp_prefer_braces = true:warning