From 2714d38b3bb9332bd83bcd7f9e083e641d0eb482 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 26 Sep 2023 11:33:57 -0700 Subject: [PATCH] chore: bump dotnet sdk to 8 (#406) --- .editorconfig | 24 ++++++++++++++++++++---- Directory.Build.props | 1 + global.json | 5 ++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index 48c5b2341..7f6cb2ac9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -811,10 +811,6 @@ dotnet_diagnostic.CA1852.severity = suggestion # CA1854: Prefer 'TryGetValue' over 'ContainsKey' and 'Item' when accessing dictionary items dotnet_diagnostic.CA1854.severity = suggestion -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859 -# CA1859: Use culture-aware string operations -dotnet_diagnostic.CA1859.severity = suggestion - # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1860 # CA1860: Avoid using 'Enumerable.Any()' extension method. dotnet_diagnostic.CA1860.severity = suggestion @@ -823,6 +819,18 @@ dotnet_diagnostic.CA1860.severity = suggestion # CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly dotnet_diagnostic.CA1861.severity = suggestion +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1862 +# CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison +dotnet_diagnostic.CA1862.severity = suggestion + +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1865 +# CA1865: Use 'string.StartsWith(char)' instead of 'string.StartsWith(string)' when you have a string with a single char +dotnet_diagnostic.CA1865.severity = suggestion + +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1869 +# CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead. +dotnet_diagnostic.CA1869.severity = suggestion + # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2000 # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = suggestion @@ -1035,6 +1043,14 @@ dotnet_diagnostic.IDE0220.severity = suggestion # IDE0251: Member can be made 'readonly' dotnet_diagnostic.IDE0251.severity = suggestion +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290 +# IDE0290: Use primary constructor +dotnet_diagnostic.IDE0290.severity = suggestion + +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300 +# IDE0290: Collection initialization can be simplified +dotnet_diagnostic.IDE0300.severity = suggestion + # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide1006 # IDE1006: Naming rule violation: These words must begin with upper case characters: ... dotnet_diagnostic.IDE1006.severity = suggestion diff --git a/Directory.Build.props b/Directory.Build.props index 64e721e31..5c17dd661 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,6 +11,7 @@ AllEnabledByDefault true $(NoWarn);CA1014;CS8002 + true diff --git a/global.json b/global.json index 95bdf7f09..42fe8224d 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,6 @@ { "sdk": { - "version": "7.0.400", - "rollForward": "latestMajor", - "allowPrerelease": false + "version": "8.0.100-rc.1.23463.5", + "rollForward": "latestMajor" } }