-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.editorconfig
More file actions
172 lines (138 loc) · 7.77 KB
/
Copy path.editorconfig
File metadata and controls
172 lines (138 loc) · 7.77 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.cs]
indent_size = 4
# File-scoped namespaces — the vast majority of the codebase uses this form. One test
# file (ComplianceExporterTests) uses a block-scoped namespace. Relaxed to :silent until
# a cleanup PR normalises it; promote to :warning once every file complies.
csharp_style_namespace_declarations = file_scoped:silent
# using directives go outside the namespace block.
csharp_using_directive_placement = outside_namespace:warning
# var — use var when the type is apparent from the right-hand side.
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = false:silent
# Expression-bodied members — the codebase uses a mix of block-body and expression-body
# forms. Relaxed to :silent to avoid forcing a mass-format pass on existing files.
# A separate cleanup PR can promote these to :warning once all sites comply.
csharp_style_expression_bodied_methods = when_on_single_line:silent
csharp_style_expression_bodied_properties = when_on_single_line:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = when_on_single_line:silent
csharp_style_expression_bodied_indexers = when_on_single_line:silent
csharp_style_expression_bodied_accessors = when_on_single_line:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
# Braces — Allman style (opening brace on its own line).
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
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents_when_block = true
# Spacing
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping — the codebase uses inline single-line statements (e.g. `if (x == null) return;`).
# csharp_preserve_single_line_statements = true preserves them rather than forcing splits.
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
# Pattern matching — most of the codebase uses modern pattern matching, but a handful of
# sites in MigratingEncryptionProvider and test files use older forms. IDE0078 and
# IDE0054/IDE0078 relaxed to :silent until a cleanup PR migrates those sites.
csharp_style_pattern_matching_over_is_with_cast_check = true:silent
csharp_style_pattern_matching_over_as_with_null_check = true:silent
csharp_style_prefer_switch_expression = true:warning
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_not_pattern = true:warning
# Null-checking idioms.
csharp_style_prefer_null_check_over_type_check = true:warning
csharp_style_throw_expression = true:silent
csharp_style_conditional_delegate_call = true:warning
# Modifier ordering required by the codebase.
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning
# this. qualifier — not used in the codebase.
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
# Language keywords vs framework type names.
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
# Object/collection initialisers — used throughout.
dotnet_style_object_initializer = true:warning
dotnet_style_collection_initializer = true:warning
# Null-propagation idioms.
dotnet_style_null_propagation = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_coalesce_expression = true:warning
# Explicit tuple names.
dotnet_style_explicit_tuple_names = true:warning
# Prefer inferred tuple and anonymous-type member names.
dotnet_style_prefer_inferred_tuple_names = true:silent
dotnet_style_prefer_inferred_anonymous_type_member_names = true:silent
# Auto-properties — AuditContext and similar classes use backing fields with null-guard
# setters that cannot be auto-properties. Relaxed to :silent; a cleanup PR can tighten.
dotnet_style_prefer_auto_properties = true:silent
# Compound assignment operators.
dotnet_style_prefer_compound_assignment = true:warning
# Simplified boolean expressions.
dotnet_style_prefer_simplified_boolean_expressions = true:warning
# Readonly fields — enforce where applicable.
dotnet_style_readonly_field = true:warning
# Accessibility modifiers — always explicit.
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
# Parentheses preferences.
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
# CA1000: static members on generic types. CacheResult<T>.Hit/Miss are established public API;
# removing them from the generic type is a v5.0 breaking change. Non-generic CacheResult factory
# is additive but cannot replace the generic statics without a binary break in the current cycle.
dotnet_diagnostic.CA1000.severity = suggestion
# CA1708: identifiers differ only by case. The GenerateGDPRExportAsync / GenerateGdprExportAsync
# pair is intentional — GDPR-all-caps is the deprecated 2.x spelling, kept for source compat.
# Downgrade until the obsolete overloads are removed in v5.0.
dotnet_diagnostic.CA1708.severity = suggestion
# CA1720: identifier contains type name. CachePolicy.Short and CachePolicy.Long are established
# public API; renaming is a v5.0 breaking change. Document intent here; fix in v5.0 cleanup.
dotnet_diagnostic.CA1720.severity = suggestion
# CA1707: underscores in member names. FilterOperator.Contains_CaseInsensitive is intentionally
# kept with its legacy underscore spelling as a deprecated enum member. Fix in v5.0 when removed.
dotnet_diagnostic.CA1707.severity = suggestion
# CA1069: duplicate enum values. FilterOperator.ContainsCaseInsensitive = Contains_CaseInsensitive = 52
# is the canonical + deprecated alias pair. Intentional; fix in v5.0 when the alias is removed.
dotnet_diagnostic.CA1069.severity = suggestion
# CA1716: parameter name conflicts with reserved keyword. IAuditReader.GetComplianceReportAsync
# uses parameter name "to" (conflicts with VB.NET keyword). Renaming is a source-breaking change
# for callers using named arguments; deferred to v5.0 with the full parameter-rename sweep.
dotnet_diagnostic.CA1716.severity = suggestion
[*.{csproj,props,targets}]
indent_size = 2
[*.{json,yml,yaml}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false