-
Notifications
You must be signed in to change notification settings - Fork 163
/
.editorconfig
163 lines (138 loc) · 6.26 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
151
152
153
154
155
156
157
158
159
160
161
162
163
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 4
tab-width = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{build,config,csproj,js,json,proj,props,targets,xml,ruleset,xsd,yml,yaml}]
indent_size = 2
tab-width = 2
max_line_length = 160
[*.{cs,cshtml,ascx,aspx}]
#### C#/.NET Code Style ####
# Default severity for IDE* analyzers with category 'Style'
# Note: specific rules below use severity silent, because Resharper code cleanup auto-fixes them.
dotnet_analyzer_diagnostic.category-Style.severity = warning
# 'using' directive preferences
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:silent
# IDE0005: Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = silent
# Namespace declarations
csharp_style_namespace_declarations = file_scoped:silent
# IDE0160: Use block-scoped namespace
dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Use file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent
# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# IDE0003: Remove this or Me qualification
dotnet_diagnostic.IDE0003.severity = silent
# IDE0009: Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
# IDE0049: Use language keywords instead of framework type names for type references
dotnet_diagnostic.IDE0049.severity = silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = silent
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:silent
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = silent
# Expression-level preferences
dotnet_style_operator_placement_when_wrapping = end_of_line
dotnet_style_prefer_auto_properties = true:silent
# IDE0032: Use auto property
dotnet_diagnostic.IDE0032.severity = silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
# IDE0045: Use conditional expression for assignment
dotnet_diagnostic.IDE0045.severity = silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
# IDE0046: Use conditional expression for return
dotnet_diagnostic.IDE0046.severity = silent
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# IDE0058: Remove unused expression value
dotnet_diagnostic.IDE0058.severity = silent
# Collection expression preferences (note: turned off in shared-package.props)
dotnet_style_prefer_collection_expression = when_types_exactly_match
# Parameter preferences
dotnet_code_quality_unused_parameters = non_public
# Local functions vs lambdas
csharp_style_prefer_local_over_anonymous_function = false:silent
# IDE0039: Use local function instead of lambda
dotnet_diagnostic.IDE0039.severity = silent
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
# IDE0027: Use expression body for accessors
dotnet_diagnostic.IDE0027.severity = silent
csharp_style_expression_bodied_constructors = false:silent
# IDE0021: Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = silent
csharp_style_expression_bodied_indexers = true:silent
# IDE0026: Use expression body for indexers
dotnet_diagnostic.IDE0026.severity = silent
csharp_style_expression_bodied_lambdas = true:silent
# IDE0053: Use expression body for lambdas
dotnet_diagnostic.IDE0053.severity = silent
csharp_style_expression_bodied_local_functions = false:silent
# IDE0061: Use expression body for local functions
dotnet_diagnostic.IDE0061.severity = silent
csharp_style_expression_bodied_methods = false:silent
# IDE0022: Use expression body for methods
dotnet_diagnostic.IDE0022.severity = silent
csharp_style_expression_bodied_operators = false:silent
# IDE0023: Use expression body for conversion operators
dotnet_diagnostic.IDE0023.severity = silent
# IDE0024: Use expression body for operators
dotnet_diagnostic.IDE0024.severity = silent
csharp_style_expression_bodied_properties = true:silent
# IDE0025: Use expression body for properties
dotnet_diagnostic.IDE0025.severity = silent
# Code-block preferences
csharp_prefer_braces = true:silent
# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = silent
# Indentation preferences
csharp_indent_case_contents_when_block = false
# Wrapping preferences
csharp_preserve_single_line_statements = false
# 'var' usage preferences
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = false:silent
# IDE0007: Use var instead of explicit type
dotnet_diagnostic.IDE0007.severity = silent
# IDE0008: Use explicit type instead of var
dotnet_diagnostic.IDE0008.severity = silent
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent
# IDE0047: Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = silent
# IDE0048: Add parentheses for clarity
dotnet_diagnostic.IDE0048.severity = silent
# IDE0010: Add missing cases to switch statement
dotnet_diagnostic.IDE0010.severity = silent
# IDE0072: Add missing cases to switch expression
dotnet_diagnostic.IDE0072.severity = silent
# IDE0029: Null check can be simplified
dotnet_diagnostic.IDE0029.severity = silent
# IDE0030: Null check can be simplified
dotnet_diagnostic.IDE0030.severity = silent
# IDE0270: Null check can be simplified
dotnet_diagnostic.IDE0270.severity = silent
# JSON002: Probable JSON string detected
dotnet_diagnostic.JSON002.severity = silent
# CA1848: Use the LoggerMessage delegates (depends on https://github.com/SteeltoeOSS/Steeltoe/issues/969)
dotnet_diagnostic.CA1848.severity = silent