Skip to content

Commit f1f5ffe

Browse files
committed
refs and cleanup
1 parent 48f4855 commit f1f5ffe

File tree

1 file changed

+374
-0
lines changed

1 file changed

+374
-0
lines changed

.editorconfig

Lines changed: 374 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,374 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
insert_final_newline = true
7+
8+
[*.cs]
9+
indent_size = 4
10+
charset = utf-8
11+
12+
# Redundant accessor body
13+
resharper_redundant_accessor_body_highlighting = error
14+
15+
# Replace with field keyword
16+
resharper_replace_with_field_keyword_highlighting = error
17+
18+
# Replace with single call to Single(..)
19+
resharper_replace_with_single_call_to_single_highlighting = error
20+
21+
# Replace with single call to SingleOrDefault(..)
22+
resharper_replace_with_single_call_to_single_or_default_highlighting = error
23+
24+
# Replace with single call to LastOrDefault(..)
25+
resharper_replace_with_single_call_to_last_or_default_highlighting = error
26+
27+
# Element is localizable
28+
resharper_localizable_element_highlighting = none
29+
30+
# Replace with single call to Last(..)
31+
resharper_replace_with_single_call_to_last_highlighting = error
32+
33+
# Replace with single call to First(..)
34+
resharper_replace_with_single_call_to_first_highlighting = error
35+
36+
# Replace with single call to FirstOrDefault(..)
37+
resharper_replace_with_single_call_to_first_or_default_highlighting = error
38+
39+
# Replace with single call to Any(..)
40+
resharper_replace_with_single_call_to_any_highlighting = error
41+
42+
# Simplify negative equality expression
43+
resharper_negative_equality_expression_highlighting = error
44+
45+
# Replace with single call to Count(..)
46+
resharper_replace_with_single_call_to_count_highlighting = error
47+
48+
# Declare types in namespaces
49+
dotnet_diagnostic.CA1050.severity = none
50+
51+
# Use Literals Where Appropriate
52+
dotnet_diagnostic.CA1802.severity = error
53+
54+
# Template should be a static expression
55+
dotnet_diagnostic.CA2254.severity = error
56+
57+
# Potentially misleading parameter name in lambda or local function
58+
resharper_all_underscore_local_parameter_name_highlighting = none
59+
60+
# Redundant explicit collection creation in argument of 'params' parameter
61+
resharper_redundant_explicit_params_array_creation_highlighting = error
62+
63+
# Do not initialize unnecessarily
64+
dotnet_diagnostic.CA1805.severity = error
65+
66+
# Avoid unsealed attributes
67+
dotnet_diagnostic.CA1813.severity = error
68+
69+
# Test for empty strings using string length
70+
dotnet_diagnostic.CA1820.severity = none
71+
72+
# Remove empty finalizers
73+
dotnet_diagnostic.CA1821.severity = error
74+
75+
# Mark members as static
76+
dotnet_diagnostic.CA1822.severity = error
77+
78+
# Avoid unused private fields
79+
dotnet_diagnostic.CA1823.severity = error
80+
81+
# Avoid zero-length array allocations
82+
dotnet_diagnostic.CA1825.severity = error
83+
84+
# Use property instead of Linq Enumerable method
85+
dotnet_diagnostic.CA1826.severity = error
86+
87+
# Do not use Count()/LongCount() when Any() can be used
88+
dotnet_diagnostic.CA1827.severity = error
89+
dotnet_diagnostic.CA1828.severity = error
90+
91+
# Use Length/Count property instead of Enumerable.Count method
92+
dotnet_diagnostic.CA1829.severity = error
93+
94+
# Prefer strongly-typed Append and Insert method overloads on StringBuilder
95+
dotnet_diagnostic.CA1830.severity = error
96+
97+
# Use AsSpan instead of Range-based indexers for string when appropriate
98+
dotnet_diagnostic.CA1831.severity = error
99+
100+
# Use AsSpan instead of Range-based indexers for string when appropriate
101+
dotnet_diagnostic.CA1831.severity = error
102+
dotnet_diagnostic.CA1832.severity = error
103+
dotnet_diagnostic.CA1833.severity = error
104+
105+
# Use StringBuilder.Append(char) for single character strings
106+
dotnet_diagnostic.CA1834.severity = error
107+
108+
# Prefer IsEmpty over Count when available
109+
dotnet_diagnostic.CA1836.severity = error
110+
111+
# Prefer IsEmpty over Count when available
112+
dotnet_diagnostic.CA1836.severity = error
113+
114+
# Use Environment.ProcessId instead of Process.GetCurrentProcess().Id
115+
dotnet_diagnostic.CA1837.severity = error
116+
117+
# Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName
118+
dotnet_diagnostic.CA1839.severity = error
119+
120+
# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId
121+
dotnet_diagnostic.CA1840.severity = error
122+
123+
# Prefer Dictionary Contains methods
124+
dotnet_diagnostic.CA1841.severity = error
125+
126+
# Do not use WhenAll with a single task
127+
dotnet_diagnostic.CA1842.severity = error
128+
129+
# Do not use WhenAll/WaitAll with a single task
130+
dotnet_diagnostic.CA1842.severity = error
131+
dotnet_diagnostic.CA1843.severity = error
132+
133+
# Use span-based 'string.Concat'
134+
dotnet_diagnostic.CA1845.severity = error
135+
136+
# Prefer AsSpan over Substring
137+
dotnet_diagnostic.CA1846.severity = error
138+
139+
# Use string.Contains(char) instead of string.Contains(string) with single characters
140+
dotnet_diagnostic.CA1847.severity = error
141+
142+
# Prefer static HashData method over ComputeHash
143+
dotnet_diagnostic.CA1850.severity = error
144+
145+
# Possible multiple enumerations of IEnumerable collection
146+
dotnet_diagnostic.CA1851.severity = error
147+
148+
# Unnecessary call to Dictionary.ContainsKey(key)
149+
dotnet_diagnostic.CA1853.severity = error
150+
151+
# Prefer the IDictionary.TryGetValue(TKey, out TValue) method
152+
dotnet_diagnostic.CA1854.severity = error
153+
154+
# Use Span<T>.Clear() instead of Span<T>.Fill()
155+
dotnet_diagnostic.CA1855.severity = error
156+
157+
# Incorrect usage of ConstantExpected attribute
158+
dotnet_diagnostic.CA1856.severity = error
159+
160+
# The parameter expects a constant for optimal performance
161+
dotnet_diagnostic.CA1857.severity = error
162+
163+
# Use StartsWith instead of IndexOf
164+
dotnet_diagnostic.CA1858.severity = error
165+
166+
# Avoid using Enumerable.Any() extension method
167+
dotnet_diagnostic.CA1860.severity = error
168+
169+
# Avoid constant arrays as arguments
170+
dotnet_diagnostic.CA1861.severity = error
171+
172+
# Use the StringComparison method overloads to perform case-insensitive string comparisons
173+
dotnet_diagnostic.CA1862.severity = error
174+
175+
# Prefer the IDictionary.TryAdd(TKey, TValue) method
176+
dotnet_diagnostic.CA1864.severity = error
177+
178+
# Use string.Method(char) instead of string.Method(string) for string with single char
179+
dotnet_diagnostic.CA1865.severity = error
180+
dotnet_diagnostic.CA1866.severity = error
181+
dotnet_diagnostic.CA1867.severity = error
182+
183+
# Unnecessary call to 'Contains' for sets
184+
dotnet_diagnostic.CA1868.severity = error
185+
186+
# Cache and reuse 'JsonSerializerOptions' instances
187+
dotnet_diagnostic.CA1869.severity = error
188+
189+
# Use a cached 'SearchValues' instance
190+
dotnet_diagnostic.CA1870.severity = error
191+
192+
# Microsoft .NET properties
193+
trim_trailing_whitespace = true
194+
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion
195+
resharper_namespace_body = file_scoped
196+
dotnet_naming_rule.private_constants_rule.severity = warning
197+
dotnet_naming_rule.private_constants_rule.style = lower_camel_case_style
198+
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
199+
dotnet_naming_rule.private_instance_fields_rule.severity = warning
200+
dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style
201+
dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols
202+
dotnet_naming_rule.private_static_fields_rule.severity = warning
203+
dotnet_naming_rule.private_static_fields_rule.style = lower_camel_case_style
204+
dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols
205+
dotnet_naming_rule.private_static_readonly_rule.severity = warning
206+
dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style
207+
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
208+
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
209+
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case
210+
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
211+
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
212+
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
213+
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private
214+
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field
215+
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
216+
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
217+
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
218+
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
219+
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
220+
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly
221+
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
222+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
223+
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
224+
225+
# ReSharper properties
226+
resharper_object_creation_when_type_not_evident = target_typed
227+
228+
# ReSharper inspection severities
229+
resharper_arrange_object_creation_when_type_evident_highlighting = error
230+
resharper_arrange_object_creation_when_type_not_evident_highlighting = error
231+
resharper_arrange_redundant_parentheses_highlighting = error
232+
resharper_arrange_static_member_qualifier_highlighting = error
233+
resharper_arrange_this_qualifier_highlighting = error
234+
resharper_arrange_type_member_modifiers_highlighting = none
235+
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
236+
resharper_built_in_type_reference_style_highlighting = hint
237+
resharper_check_namespace_highlighting = none
238+
resharper_convert_to_using_declaration_highlighting = error
239+
resharper_field_can_be_made_read_only_local_highlighting = none
240+
resharper_merge_into_logical_pattern_highlighting = warning
241+
resharper_merge_into_pattern_highlighting = error
242+
resharper_method_has_async_overload_highlighting = warning
243+
# because stop rider giving errors before source generators have run
244+
resharper_partial_type_with_single_part_highlighting = warning
245+
resharper_redundant_base_qualifier_highlighting = warning
246+
resharper_redundant_cast_highlighting = error
247+
resharper_redundant_empty_object_creation_argument_list_highlighting = error
248+
resharper_redundant_empty_object_or_collection_initializer_highlighting = error
249+
resharper_redundant_name_qualifier_highlighting = error
250+
resharper_redundant_suppress_nullable_warning_expression_highlighting = error
251+
resharper_redundant_using_directive_highlighting = error
252+
resharper_redundant_verbatim_string_prefix_highlighting = error
253+
resharper_redundant_lambda_signature_parentheses_highlighting = error
254+
resharper_replace_substring_with_range_indexer_highlighting = warning
255+
resharper_suggest_var_or_type_built_in_types_highlighting = error
256+
resharper_suggest_var_or_type_elsewhere_highlighting = error
257+
resharper_suggest_var_or_type_simple_types_highlighting = error
258+
resharper_unnecessary_whitespace_highlighting = error
259+
resharper_use_await_using_highlighting = warning
260+
resharper_use_deconstruction_highlighting = warning
261+
262+
# Sort using and Import directives with System.* appearing first
263+
dotnet_sort_system_directives_first = true
264+
265+
# Avoid "this." and "Me." if not necessary
266+
dotnet_style_qualification_for_field = false:error
267+
dotnet_style_qualification_for_property = false:error
268+
dotnet_style_qualification_for_method = false:error
269+
dotnet_style_qualification_for_event = false:error
270+
271+
# Use language keywords instead of framework type names for type references
272+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
273+
dotnet_style_predefined_type_for_member_access = true:error
274+
275+
# Suggest more modern language features when available
276+
dotnet_style_object_initializer = true:error
277+
dotnet_style_collection_initializer = true:error
278+
dotnet_style_coalesce_expression = false:error
279+
dotnet_style_null_propagation = true:error
280+
dotnet_style_explicit_tuple_names = true:error
281+
282+
# Use collection expression syntax
283+
resharper_use_collection_expression_highlighting = error
284+
285+
# Prefer "var" everywhere
286+
csharp_style_var_for_built_in_types = true:error
287+
csharp_style_var_when_type_is_apparent = true:error
288+
csharp_style_var_elsewhere = true:error
289+
290+
# Prefer method-like constructs to have a block body
291+
csharp_style_expression_bodied_methods = true:error
292+
csharp_style_expression_bodied_local_functions = true:error
293+
csharp_style_expression_bodied_constructors = true:error
294+
csharp_style_expression_bodied_operators = true:error
295+
resharper_place_expr_method_on_single_line = false
296+
297+
# Prefer property-like constructs to have an expression-body
298+
csharp_style_expression_bodied_properties = true:error
299+
csharp_style_expression_bodied_indexers = true:error
300+
csharp_style_expression_bodied_accessors = true:error
301+
302+
# Suggest more modern language features when available
303+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
304+
csharp_style_pattern_matching_over_as_with_null_check = true:error
305+
csharp_style_inlined_variable_declaration = true:suggestion
306+
csharp_style_throw_expression = true:suggestion
307+
csharp_style_conditional_delegate_call = true:suggestion
308+
309+
# Newline settings
310+
#csharp_new_line_before_open_brace = all:error
311+
resharper_max_array_initializer_elements_on_line = 1
312+
csharp_new_line_before_else = true
313+
csharp_new_line_before_catch = true
314+
csharp_new_line_before_finally = true
315+
csharp_new_line_before_members_in_object_initializers = true
316+
csharp_new_line_before_members_in_anonymous_types = true
317+
resharper_wrap_before_first_type_parameter_constraint = true
318+
resharper_wrap_extends_list_style = chop_always
319+
resharper_wrap_after_dot_in_method_calls = false
320+
resharper_wrap_before_binary_pattern_op = false
321+
resharper_wrap_object_and_collection_initializer_style = chop_always
322+
resharper_place_simple_initializer_on_single_line = false
323+
324+
# space
325+
resharper_space_around_lambda_arrow = true
326+
327+
dotnet_style_require_accessibility_modifiers = never:error
328+
resharper_place_type_constraints_on_same_line = false
329+
resharper_blank_lines_inside_namespace = 0
330+
resharper_blank_lines_after_file_scoped_namespace_directive = 1
331+
resharper_blank_lines_inside_type = 0
332+
333+
resharper_place_attribute_on_same_line = false
334+
335+
#braces https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_CSharpCodeStylePageImplSchema.html#Braces
336+
resharper_braces_for_ifelse = required
337+
resharper_braces_for_foreach = required
338+
resharper_braces_for_while = required
339+
resharper_braces_for_dowhile = required
340+
resharper_braces_for_lock = required
341+
resharper_braces_for_fixed = required
342+
resharper_braces_for_for = required
343+
344+
resharper_return_value_of_pure_method_is_not_used_highlighting = error
345+
346+
347+
resharper_misleading_body_like_statement_highlighting = error
348+
349+
resharper_redundant_record_class_keyword_highlighting = error
350+
351+
resharper_redundant_extends_list_entry_highlighting = error
352+
353+
resharper_redundant_type_arguments_inside_nameof_highlighting = error
354+
355+
# Xml files
356+
[*.{xml,config,nuspec,resx,vsixmanifest,csproj,targets,props,fsproj}]
357+
indent_size = 2
358+
# https://www.jetbrains.com/help/resharper/EditorConfig_XML_XmlCodeStylePageSchema.html#resharper_xml_blank_line_after_pi
359+
resharper_blank_line_after_pi = false
360+
resharper_space_before_self_closing = true
361+
ij_xml_space_inside_empty_tag = true
362+
363+
[*.json]
364+
indent_size = 2
365+
366+
# Verify settings
367+
[*.{received,verified}.{txt,xml,json,md,sql,csv,html,htm,nuspec,rels}]
368+
charset = utf-8-bom
369+
end_of_line = lf
370+
indent_size = unset
371+
indent_style = unset
372+
insert_final_newline = false
373+
tab_width = unset
374+
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)