-
Notifications
You must be signed in to change notification settings - Fork 3
/
.editorconfig
150 lines (124 loc) · 6.37 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
###############################
# Core EditorConfig Options #
###############################
root = true
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = true:warning
dotnet_separate_import_directive_groups = true:warning
# this. preferences
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_qualification_for_event = true:warning
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
# Modifier preferences
dotnet_style_require_accessibility_modifiers = always:warning
dotnet_style_readonly_field = true:warning
# Expression-level preferences
dotnet_style_object_initializer = true:warning
dotnet_style_collection_initializer = false:warning
dotnet_style_prefer_collection_expression = false:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_coalesce_expression = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_return = true:warning
# Code Quality
dotnet_code_quality_unused_parameters = all:warning
# Namespace preferences
csharp_style_namespace_declarations = file_scoped:warning
###############################
# Naming Conventions #
###############################
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_style_allow_multiple_blank_lines_experimental = false
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
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 public members (properties, methods, events)
dotnet_naming_rule.public_members_should_be_pascal_case.severity = warning
dotnet_naming_rule.public_members_should_be_pascal_case.symbols = public_members
dotnet_naming_rule.public_members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.public_members.applicable_kinds = property,method,event,field
dotnet_naming_symbols.public_members.applicable_accessibilities = public,protected,internal,protected_internal
# Use camelCase with '_' prefix for private fields
dotnet_naming_style.underscore_prefix_style.capitalization = camel_case
dotnet_naming_style.underscore_prefix_style.required_prefix = _
dotnet_naming_rule.private_fields_should_have_underscore_prefix.severity = warning
dotnet_naming_rule.private_fields_should_have_underscore_prefix.symbols = private_fields
dotnet_naming_rule.private_fields_should_have_underscore_prefix.style = underscore_prefix_style
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
###############################
# Analyzers #
###############################
dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning
dotnet_analyzer_diagnostic.category-Documentation.severity = warning
dotnet_analyzer_diagnostic.category-Design.severity = warning
dotnet_analyzer_diagnostic.category-Performance.severity = warning
dotnet_analyzer_diagnostic.category-Reliability.severity = warning
dotnet_analyzer_diagnostic.category-Security.severity = warning
dotnet_analyzer_diagnostic.category-Style.severity = warning
# Explicit code exclusions
# Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = none
# If statement can be simplified
dotnet_diagnostic.IDE0046.severity = none
dotnet_diagnostic.IDE0045.severity = none
# Use switch expression
dotnet_diagnostic.IDE0066.severity = none
# Use collection initializers or expressions
# dotnet_diagnostic.IDE0028.severity = none
###############################
# C# Coding Conventions #
###############################
[*.cs]
# var preferences
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning
# Expression-bodied members
csharp_style_expression_bodied_methods = when_possible:warning
csharp_style_expression_bodied_constructors = when_possible:warning
csharp_style_expression_bodied_operators = when_possible:warning
csharp_style_expression_bodied_properties = when_possible:warning
csharp_style_expression_bodied_indexers = when_possible:warning
csharp_style_expression_bodied_accessors = when_possible:warning
# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_pattern_matching_over_as_with_null_check = true:warning
# Null-checking preferences
csharp_style_throw_expression = true:warning
csharp_style_conditional_delegate_call = true:warning
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
# Expression-level preferences
csharp_prefer_braces = true:warning
csharp_style_deconstructed_variable_declaration = true:warning
csharp_prefer_simple_default_expression = false:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_style_inlined_variable_declaration = true:warning
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = suggestion
# IDE0290: Use primary constructor
dotnet_diagnostic.IDE0290.severity = silent