forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to .NET 8 (NethermindEth#6150)
- Loading branch information
Showing
240 changed files
with
1,678 additions
and
2,505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
**/obj | ||
**/bin | ||
**/logs | ||
**/tests | ||
**/ndm_db | ||
**/nethermind_db | ||
.config | ||
.github | ||
benchmarking | ||
scripts | ||
wasm | ||
src/tests | ||
**/.idea/ | ||
**/.vs/ | ||
**/.vscode/ | ||
**/artifacts/ | ||
**/bin/ | ||
**/obj/ | ||
|
||
src/Nethermind/*.Test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,251 +1,91 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# VS Code only supports basic settings (indent type, size, etc) | ||
# Visual Studio has extensive support for 100+ settings (defaults are below) | ||
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference | ||
# Rider (& Resharper) support the common .NET settings, plus hundreds of others | ||
# https://www.jetbrains.com/help/rider/EditorConfig_Index.html | ||
# Other editors (e.g. Atom, VIM, etc, may have varying support) | ||
|
||
############################################################################### | ||
# Custom settings: | ||
|
||
# top-most EditorConfig file | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
file_header_template = SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited\nSPDX-License-Identifier: LGPL-3.0-only | ||
|
||
############################### | ||
# Other file type settings # | ||
############################### | ||
[*.cs] | ||
indent_size = 4 | ||
|
||
# XML project files | ||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] | ||
indent_size = 2 | ||
#### Naming styles #### | ||
|
||
# XML config files | ||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] | ||
indent_size = 2 | ||
# Naming rules | ||
|
||
# JSON files, other XML files | ||
[*.{json,xml}] | ||
indent_size = 2 | ||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion | ||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface | ||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i | ||
|
||
# Powershell files | ||
[*.ps1] | ||
indent_size = 2 | ||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion | ||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types | ||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case | ||
|
||
# Shell script files | ||
[*.sh] | ||
indent_size = 2 | ||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion | ||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members | ||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case | ||
|
||
# YAML files | ||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
# Symbol specifications | ||
|
||
############################### | ||
# Override Visual Studio # | ||
############################### | ||
# Copy here and comment out in default Visual Studio section | ||
dotnet_naming_symbols.interface.applicable_kinds = interface | ||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | ||
dotnet_naming_symbols.interface.required_modifiers = | ||
|
||
# Use of utf-8-bom is discouraged by editor config (https://editorconfig-specification.readthedocs.io/en/latest/) | ||
[*.{cs,csx,vb,vbx}] | ||
charset = utf-8 | ||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum | ||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | ||
dotnet_naming_symbols.types.required_modifiers = | ||
|
||
[*.{cs,vb}] | ||
# this. preferences - make suggestion | ||
dotnet_style_qualification_for_field = false:suggestion | ||
dotnet_style_qualification_for_property = false:suggestion | ||
dotnet_style_qualification_for_method = false:suggestion | ||
dotnet_style_qualification_for_event = false:suggestion | ||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method | ||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | ||
dotnet_naming_symbols.non_field_members.required_modifiers = | ||
|
||
# Language keywords vs BCL types preferences -- make suggestion | ||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion | ||
dotnet_style_predefined_type_for_member_access = true:suggestion | ||
# Naming styles | ||
|
||
[*.cs] | ||
# Expression-level preferences -- make suggestion | ||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion | ||
dotnet_style_prefer_auto_properties = true:suggestion | ||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion | ||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion | ||
dotnet_naming_style.begins_with_i.required_prefix = I | ||
dotnet_naming_style.begins_with_i.required_suffix = | ||
dotnet_naming_style.begins_with_i.word_separator = | ||
dotnet_naming_style.begins_with_i.capitalization = pascal_case | ||
|
||
# var preferences -- prefer type names over var, make suggestion | ||
csharp_style_var_for_built_in_types = false:suggestion | ||
csharp_style_var_when_type_is_apparent = false:suggestion | ||
csharp_style_var_elsewhere = false:suggestion | ||
dotnet_naming_style.pascal_case.required_prefix = | ||
dotnet_naming_style.pascal_case.required_suffix = | ||
dotnet_naming_style.pascal_case.word_separator = | ||
dotnet_naming_style.pascal_case.capitalization = pascal_case | ||
|
||
# Expression-level preferences -- allow single line without braces | ||
csharp_prefer_braces = when_multiline:suggestion | ||
resharper_csharp_braces_for_ifelse=required_for_multiline | ||
|
||
# Static fields are camelCase and start with _ | ||
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion | ||
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields | ||
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style | ||
|
||
dotnet_naming_symbols.static_fields.applicable_kinds = field | ||
dotnet_naming_symbols.static_fields.required_modifiers = static | ||
|
||
dotnet_naming_style.static_field_style.capitalization = camel_case | ||
dotnet_naming_style.static_field_style.required_prefix = _ | ||
|
||
# Instance fields are camelCase and start with _ | ||
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion | ||
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields | ||
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style | ||
|
||
dotnet_naming_symbols.instance_fields.applicable_kinds = field | ||
|
||
dotnet_naming_style.instance_field_style.capitalization = camel_case | ||
dotnet_naming_style.instance_field_style.required_prefix = _ | ||
|
||
# Locals and parameters are camelCase | ||
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion | ||
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters | ||
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style | ||
|
||
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local | ||
|
||
dotnet_naming_style.camel_case_style.capitalization = camel_case | ||
|
||
# Async methods end with Async | ||
dotnet_naming_rule.async_methods_should_have_suffix.severity = suggestion | ||
dotnet_naming_rule.async_methods_should_have_suffix.symbols = async_methods | ||
dotnet_naming_rule.async_methods_should_have_suffix.style = async_methods_style | ||
|
||
dotnet_naming_symbols.async_methods.applicable_kinds = method | ||
dotnet_naming_symbols.async_methods.required_modifiers = async | ||
|
||
dotnet_naming_style.async_methods_style.required_suffix = Async | ||
|
||
|
||
################################################################################# | ||
# Default Visual Studio settings (some of these are also used by Rider/Resharper) | ||
|
||
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs | ||
############################### | ||
# Core EditorConfig Options # | ||
############################### | ||
|
||
# Code files | ||
#charset = utf-8-bom | ||
############################### | ||
# .NET Coding Conventions # | ||
############################### | ||
[*.{cs,vb}] | ||
# Organize usings | ||
dotnet_sort_system_directives_first = true | ||
# 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 | ||
# 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 | ||
# Parentheses preferences | ||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent | ||
# Modifier preferences | ||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent | ||
dotnet_style_readonly_field = true:suggestion | ||
# Expression-level preferences | ||
dotnet_naming_style.pascal_case.required_prefix = | ||
dotnet_naming_style.pascal_case.required_suffix = | ||
dotnet_naming_style.pascal_case.word_separator = | ||
dotnet_naming_style.pascal_case.capitalization = pascal_case | ||
dotnet_style_operator_placement_when_wrapping = beginning_of_line | ||
dotnet_style_coalesce_expression = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion | ||
dotnet_style_prefer_auto_properties = true:silent | ||
dotnet_style_object_initializer = true:suggestion | ||
dotnet_style_prefer_collection_expression = true:suggestion | ||
dotnet_style_collection_initializer = true:suggestion | ||
dotnet_style_explicit_tuple_names = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_coalesce_expression = true:suggestion | ||
#dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent | ||
dotnet_style_prefer_inferred_tuple_names = true:suggestion | ||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion | ||
#dotnet_style_prefer_auto_properties = true:silent | ||
#dotnet_style_prefer_conditional_expression_over_assignment = true:silent | ||
#dotnet_style_prefer_conditional_expression_over_return = true:silent | ||
############################### | ||
# Naming Conventions # | ||
############################### | ||
# Style Definitions | ||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
# Use PascalCase for constant fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style | ||
dotnet_naming_symbols.constant_fields.applicable_kinds = field | ||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = * | ||
dotnet_naming_symbols.constant_fields.required_modifiers = const | ||
############################### | ||
# C# Coding Conventions # | ||
############################### | ||
[*.cs] | ||
# var preferences | ||
#csharp_style_var_for_built_in_types = true:silent | ||
#csharp_style_var_when_type_is_apparent = true:silent | ||
#csharp_style_var_elsewhere = true:silent | ||
# Expression-bodied members | ||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion | ||
|
||
csharp_indent_labels = one_less_than_current | ||
csharp_using_directive_placement = outside_namespace:silent | ||
csharp_prefer_simple_using_statement = true:suggestion | ||
csharp_prefer_braces = when_multiline:suggestion | ||
csharp_style_namespace_declarations = file_scoped:suggestion | ||
csharp_style_prefer_method_group_conversion = true:silent | ||
csharp_style_prefer_top_level_statements = true:silent | ||
csharp_style_prefer_primary_constructors = true:suggestion | ||
csharp_style_expression_bodied_methods = false:silent | ||
csharp_style_expression_bodied_constructors = false:silent | ||
csharp_style_expression_bodied_operators = false:silent | ||
csharp_style_expression_bodied_properties = true:silent | ||
csharp_style_expression_bodied_indexers = true:silent | ||
csharp_style_expression_bodied_accessors = true:silent | ||
# Pattern matching preferences | ||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion | ||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion | ||
# Null-checking preferences | ||
csharp_style_throw_expression = true:suggestion | ||
csharp_style_conditional_delegate_call = true:suggestion | ||
# Modifier preferences | ||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion | ||
# Expression-level preferences | ||
#csharp_prefer_braces = true:silent | ||
csharp_style_deconstructed_variable_declaration = true:suggestion | ||
csharp_prefer_simple_default_expression = true:suggestion | ||
csharp_style_pattern_local_over_anonymous_function = true:suggestion | ||
csharp_style_inlined_variable_declaration = true:suggestion | ||
csharp_style_namespace_declarations = file_scoped:suggestion | ||
############################### | ||
# C# Formatting Rules # | ||
############################### | ||
# New line preferences | ||
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 preferences | ||
csharp_indent_case_contents = true | ||
csharp_indent_switch_labels = true | ||
csharp_indent_labels = flush_left | ||
# Space preferences | ||
csharp_space_after_cast = false | ||
csharp_space_after_keywords_in_control_flow_statements = true | ||
csharp_space_between_method_call_parameter_list_parentheses = false | ||
csharp_space_between_method_declaration_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 preferences | ||
csharp_preserve_single_line_statements = true | ||
csharp_preserve_single_line_blocks = true | ||
############################### | ||
# VB Coding Conventions # | ||
############################### | ||
[*.vb] | ||
# Modifier preferences | ||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion | ||
csharp_style_expression_bodied_lambdas = true:silent | ||
csharp_style_expression_bodied_local_functions = false:silent | ||
csharp_style_var_for_built_in_types = true:silent | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
csharp_style_var_elsewhere = false:suggestion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,2 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto eol=lf | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
Oops, something went wrong.