-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
70 lines (58 loc) · 3.58 KB
/
Copy path.editorconfig
File metadata and controls
70 lines (58 loc) · 3.58 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
root = true
[*]
charset = utf-8
# lf, not crlf: every tracked file is committed LF, and CI runs the `dotnet format whitespace`
# gate on Linux where nothing rewrites endings on checkout. Demanding crlf here only passes on
# Windows, where core.autocrlf converts on checkout and hides the mismatch. See .gitattributes,
# which pins eol=lf so no contributor's autocrlf setting can change what lands in a blob.
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.cs]
indent_style = space
indent_size = 4
# STYLEGUIDE.md: "Every method ... must use a block body. Expression bodies (=>) are forbidden on
# methods, no matter how short." Properties are exempted here (project preference overrides the
# guide for the common one-line forwarding getter).
csharp_style_expression_bodied_methods = false:warning
csharp_style_expression_bodied_constructors = false:warning
csharp_style_expression_bodied_operators = false:warning
csharp_style_expression_bodied_local_functions = false:warning
# STYLEGUIDE.md: "Always use braces on `if`, even single-line bodies. The linter enforces this."
csharp_prefer_braces = true:warning
# STYLEGUIDE.md ternary rule ("nested ternary" / "branches contain logic" forbidden) has no direct
# analyzer id; IDE0045/IDE0046 (convert if to/from ternary) would fight that rule, so both are off.
dotnet_diagnostic.IDE0045.severity = none
dotnet_diagnostic.IDE0046.severity = none
# Readers and writers hand stream/archive ownership across constructors and out parameters, and
# dispose it on the failure path instead of in the method that created it. None of these three rules
# can follow ownership that far, so every one of their reports here was a false positive carrying a
# hand-written justification — 91 of them before this was turned off. The other IDISP rules still
# run; they catch real leaks. Re-enable any of these if the ownership model ever stops being
# constructor-transfer.
dotnet_diagnostic.IDISP001.severity = none
dotnet_diagnostic.IDISP007.severity = none
dotnet_diagnostic.CA2000.severity = none
# PooledStreamRowEnumerator provides Dispose/DisposeAsync for derived enumerators that declare
# IExcelRowEnumerator themselves, so the base deliberately does not implement IDisposable. S2953 is
# suppressed on that member for the same reason.
dotnet_diagnostic.IDISP009.severity = none
# Naming: private fields _camelCase, private consts PascalCase, everything else PascalCase/camelCase
# per STYLEGUIDE.md.
dotnet_naming_style.underscore_camel_case.capitalization = camel_case
dotnet_naming_style.underscore_camel_case.required_prefix = _
dotnet_naming_style.pascal_case.capitalization = pascal_case
# Consts first — more specific than the general private-field rule below, so it must win. Rule order
# matters: the first matching rule applies.
dotnet_naming_symbols.private_consts.applicable_kinds = field
dotnet_naming_symbols.private_consts.applicable_accessibilities = private
dotnet_naming_symbols.private_consts.required_modifiers = const
dotnet_naming_rule.private_consts_pascal_case.symbols = private_consts
dotnet_naming_rule.private_consts_pascal_case.style = pascal_case
dotnet_naming_rule.private_consts_pascal_case.severity = warning
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_rule.private_fields_underscore_camel_case.symbols = private_fields
dotnet_naming_rule.private_fields_underscore_camel_case.style = underscore_camel_case
dotnet_naming_rule.private_fields_underscore_camel_case.severity = warning