Welcome to mirror list, hosted at ThFree Co, Russian Federation.

.editorconfig - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c3cabd66d4381c0690e45315f046e1a61723e542 (plain)
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
# top-most EditorConfig file
root = true

[*.cs]
indent_style = tab
indent_size = 4
csharp_new_line_before_open_brace = types,methods
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
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

csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_name_and_open_parenthesis = true
csharp_space_between_method_call_name_and_opening_parenthesis = true
csharp_space_before_open_square_brackets = false
csharp_space_after_cast = true

csharp_indent_switch_labels = false

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true

# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none

# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Avoid redundant accessibility modifiers when they're default
dotnet_style_require_accessibility_modifiers = omit_if_default:suggestion

### Code Style Analyzers

# IDE0004: Remove unnecessary cast
dotnet_diagnostic.IDE0004.severity = warning

# IDE0005: Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = warning

# IDE0019: Use pattern matching
dotnet_diagnostic.IDE0019.severity = warning

# IDE0020: Use pattern matching
dotnet_diagnostic.IDE0020.severity = warning

# IDE0029: Null check can be simplified
dotnet_diagnostic.IDE0029.severity = warning

# IDE0031: Null check can be simplified
dotnet_diagnostic.IDE0031.severity = warning

# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning

# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = warning

# IDE0039: Prefer local functions over anonymous functions
dotnet_diagnostic.IDE0039.severity = warning

# IDE0041: Null check can be simplified
dotnet_diagnostic.IDE0041.severity = warning

# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning

# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning

# IDE0047: Parentheses can be removed
dotnet_diagnostic.IDE0047.severity = warning

# IDE0051: Remove unused private members (no reads or writes)
dotnet_diagnostic.IDE0051.severity = warning

# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning

# IDE0053: Prefer expression bodies for lambdas
dotnet_diagnostic.IDE0053.severity = warning

# IDE0054: Use compound assignment
dotnet_diagnostic.IDE0054.severity = warning

# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = warning

# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = warning

# IDE0065: Using directives to be placed outside the namespace
dotnet_diagnostic.IDE0065.severity = warning

# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = warning
file_header_template = Copyright (c) .NET Foundation and contributors. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information.

# IDE0074: Use compound assignment
dotnet_diagnostic.IDE0074.severity = warning

# IDE0082: Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = warning

# IDE0083: Use is not pattern matching
#dotnet_diagnostic.IDE0083.severity = warning // requires new C# for Mono

# IDE0110: Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = warning

## CA analyzer rules
dotnet_analyzer_diagnostic.category-performance.severity = warning
dotnet_analyzer_diagnostic.category-maintainability.severity = warning
dotnet_analyzer_diagnostic.category-reliability.severity = warning
dotnet_analyzer_diagnostic.category-usage.severity = warning
#dotnet_analyzer_diagnostic.category-style.severity = warning

# call GC.SuppressFinalize(object)
dotnet_diagnostic.CA1816.severity = none

# CA1834: Use 'StringBuilder.Append(char)'
dotnet_diagnostic.CA1834.severity = none

# RS2008 Ignore analyzer release tracking
dotnet_diagnostic.RS2008.severity = none

# Exception type is not sufficiently specific
dotnet_diagnostic.CA2201.severity = none

# xUnit1004: Test methods should not be skipped
dotnet_diagnostic.xUnit1004.severity = none

# CA1805: Member is explicitly initialized to it's default value
dotnet_diagnostic.CA1805.severity = none

[src/linker/ref/**/*.cs]

# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = none

# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = none

[test/**/*.cs]
dotnet_diagnostic.IDE0060.severity = none

[test/Mono.Linker.Tests/TestCases/Dependencies/WarningSuppressionExpectations*.cs]
dotnet_diagnostic.IDE0073.severity = none

[external**]
dotnet_diagnostic.IDE0073.severity = none

[external**]
dotnet_analyzer_diagnostic.severity = none
generated_code = true