From c6be1ba170f7c96593462864f783822d25e2a3a8 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Wed, 7 Jun 2023 09:22:06 -0700 Subject: [PATCH] Upgrade .NET SDK to v7.0.302 + editorconfig update (#2090) --- .editorconfig | 46 ++++++++++++++++++++++++++++++++++----------- global.json | 16 ++++++++-------- sqltoolsservice.sln | 1 + 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/.editorconfig b/.editorconfig index cdbdbf59..b19a651b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -230,14 +230,14 @@ csharp_style_var_for_built_in_types = false csharp_style_var_when_type_is_apparent = true # Expression-bodied members -csharp_style_expression_bodied_accessors = true -csharp_style_expression_bodied_constructors = false -csharp_style_expression_bodied_indexers = true -csharp_style_expression_bodied_lambdas = true -csharp_style_expression_bodied_local_functions = false -csharp_style_expression_bodied_methods = false -csharp_style_expression_bodied_operators = false -csharp_style_expression_bodied_properties = true +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent # Pattern matching preferences csharp_style_pattern_matching_over_as_with_null_check = true @@ -254,8 +254,8 @@ csharp_prefer_static_local_function = true csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async # Code-block preferences -csharp_prefer_braces = true -csharp_prefer_simple_using_statement = true +csharp_prefer_braces = true:silent +csharp_prefer_simple_using_statement = true:suggestion # Expression-level preferences csharp_prefer_simple_default_expression = true @@ -272,7 +272,7 @@ dotnet_diagnostic.IDE0058.severity = silent # csharp_style_unused_value_expression_statement_preference = discard_variable # 'using' directive preferences -csharp_using_directive_placement = outside_namespace +csharp_using_directive_placement = outside_namespace:silent # New line preferences csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true @@ -367,3 +367,27 @@ 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 +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent + +# IDE0251: Make member 'readonly' +dotnet_diagnostic.IDE0251.severity = warning + +[*.{cs,vb}] +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_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = false:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion \ No newline at end of file diff --git a/global.json b/global.json index 3231119b..cdba6025 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { - "sdk": { - "version": "7.0.200", - "rollForward": "latestFeature" - }, - "msbuild-sdks": { - "Microsoft.Build.NoTargets": "3.2.9" - } -} + "sdk": { + "version": "7.0.302", + "rollForward": "latestFeature" + }, + "msbuild-sdks": { + "Microsoft.Build.NoTargets": "3.2.9" + } +} \ No newline at end of file diff --git a/sqltoolsservice.sln b/sqltoolsservice.sln index 1f2c7af6..a25b129d 100644 --- a/sqltoolsservice.sln +++ b/sqltoolsservice.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AB9CA2B8-6 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{32DC973E-9EEA-4694-B1C2-B031167AB945}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig .gitignore = .gitignore .mention-bot = .mention-bot .travis.yml = .travis.yml