From d90ae5bcdd92dcca5df34522b4a52588286b5a2b Mon Sep 17 00:00:00 2001 From: backtrack5r3 Date: Fri, 30 Jan 2026 17:17:04 +0100 Subject: [PATCH] fix(202): add `#nullable enabled` directive on top of generated file This avoid CS8669 warnings Signed-off-by: backtrack5r3 --- internal/cmd/testdata/success_csharp.golden | 1 + internal/generators/csharp/csharp.tmpl | 1 + test/csharp-integration/OpenFeature.cs | 1 + test/csharp-integration/OpenFeature.g.cs | 1 + test/csharp-integration/expected/OpenFeature.cs | 1 + test/csharp-integration/expected/OpenFeature.g.cs | 1 + 6 files changed, 6 insertions(+) diff --git a/internal/cmd/testdata/success_csharp.golden b/internal/cmd/testdata/success_csharp.golden index 92c78d9..05fa1d0 100644 --- a/internal/cmd/testdata/success_csharp.golden +++ b/internal/cmd/testdata/success_csharp.golden @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/internal/generators/csharp/csharp.tmpl b/internal/generators/csharp/csharp.tmpl index 6517174..414e434 100644 --- a/internal/generators/csharp/csharp.tmpl +++ b/internal/generators/csharp/csharp.tmpl @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/csharp-integration/OpenFeature.cs b/test/csharp-integration/OpenFeature.cs index 159b902..d4262bc 100644 --- a/test/csharp-integration/OpenFeature.cs +++ b/test/csharp-integration/OpenFeature.cs @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/csharp-integration/OpenFeature.g.cs b/test/csharp-integration/OpenFeature.g.cs index 92c78d9..05fa1d0 100644 --- a/test/csharp-integration/OpenFeature.g.cs +++ b/test/csharp-integration/OpenFeature.g.cs @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/csharp-integration/expected/OpenFeature.cs b/test/csharp-integration/expected/OpenFeature.cs index c24f009..cd0f584 100644 --- a/test/csharp-integration/expected/OpenFeature.cs +++ b/test/csharp-integration/expected/OpenFeature.cs @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/csharp-integration/expected/OpenFeature.g.cs b/test/csharp-integration/expected/OpenFeature.g.cs index a1a3b09..a9ed769 100644 --- a/test/csharp-integration/expected/OpenFeature.g.cs +++ b/test/csharp-integration/expected/OpenFeature.g.cs @@ -1,4 +1,5 @@ // AUTOMATICALLY GENERATED BY OPENFEATURE CLI, DO NOT EDIT. +#nullable enable using System; using System.Collections.Generic; using System.Threading.Tasks;