From 58658a1e6254e8e0f39c2ef6d6df58353f52d69b Mon Sep 17 00:00:00 2001 From: neuecc Date: Thu, 13 Jun 2024 09:32:17 +0900 Subject: [PATCH] disable warning about null reference on nullable disabled --- sandbox/GeneratorSandbox/GeneratorSandbox.csproj | 2 +- sandbox/GeneratorSandbox/Program.cs | 3 ++- src/ConsoleAppFramework/ConsoleAppGenerator.cs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sandbox/GeneratorSandbox/GeneratorSandbox.csproj b/sandbox/GeneratorSandbox/GeneratorSandbox.csproj index 7a583a9..24c9fbe 100644 --- a/sandbox/GeneratorSandbox/GeneratorSandbox.csproj +++ b/sandbox/GeneratorSandbox/GeneratorSandbox.csproj @@ -4,7 +4,7 @@ Exe net8.0 enable - enable + disable true 1701;1702;CS8321 false diff --git a/sandbox/GeneratorSandbox/Program.cs b/sandbox/GeneratorSandbox/Program.cs index f9b6664..86d3911 100644 --- a/sandbox/GeneratorSandbox/Program.cs +++ b/sandbox/GeneratorSandbox/Program.cs @@ -31,7 +31,8 @@ public void Handle( bool a16, bool a17, bool a18, - bool a19 + bool a19, + string foo = null ) { Console.Write("ok"); diff --git a/src/ConsoleAppFramework/ConsoleAppGenerator.cs b/src/ConsoleAppFramework/ConsoleAppGenerator.cs index 56468e5..14d78c6 100644 --- a/src/ConsoleAppFramework/ConsoleAppGenerator.cs +++ b/src/ConsoleAppFramework/ConsoleAppGenerator.cs @@ -556,6 +556,7 @@ static void EmitConsoleAppTemplateSource(IncrementalGeneratorPostInitializationC #pragma warning disable CS9074 // The 'scoped' modifier of parameter doesn't match overridden or implemented member #pragma warning disable CA1050 // Declare types in namespaces. #pragma warning disable CS1998 +#pragma warning disable CS8625 namespace ConsoleAppFramework;