diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6c7f4e5..52fc3cf 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-dotnet@v6 with: dotnet-version: | - 10.0.x + 11.0.x - name: Cache NuGet Packages uses: actions/cache@v6.1.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fd4aae..ccc6b2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-dotnet@v6 with: dotnet-version: | - 10.0.x + 11.0.x - name: Cache NuGet Packages uses: actions/cache@v6.1.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index b3dbebf..bb91ed9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/build/Tests.props b/build/Tests.props index e5331f0..de56f82 100644 --- a/build/Tests.props +++ b/build/Tests.props @@ -4,7 +4,7 @@ CA1859;CA1861 Exe $(MSBuildProjectName.Replace('.Tests', '')) - net10.0 + net10.0;net11.0 --coverage --coverage-output-format cobertura --coverage-output $(MSBuildProjectName).$(TargetFramework).coverage.cobertura.xml --coverage-settings "$(MSBuildThisFileDirectory)../instrumentation.config.xml" diff --git a/src/Valuify.Tests/Snippets/Generated.cs b/src/Valuify.Tests/Snippets/Generated.cs index 9748bd0..9ccf457 100644 --- a/src/Valuify.Tests/Snippets/Generated.cs +++ b/src/Valuify.Tests/Snippets/Generated.cs @@ -1,6 +1,7 @@ namespace Valuify.Snippets; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Text; using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Text; @@ -8,12 +9,13 @@ [DebuggerDisplay("{Hint,nq}")] public sealed record Generated(string Content, Extensions Extensions, string Hint, Type? Generator = default) { + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1316:Tuple element names should use correct casing", Justification = "Casing matches declaration.")] public void IsExpectedIn(SolutionState state) { Type generator = Generator ?? typeof(ClassGenerator); SourceHashAlgorithm checksumAlgorithm = generator == typeof(ClassGenerator) ? SourceHashAlgorithm.Sha256 : SourceHashAlgorithm.Sha1; var content = SourceText.From(Content, Encoding.UTF8, checksumAlgorithm); - state.GeneratedSources.Add((sourceGeneratorType: generator, filename: $"{Hint}.g.cs", content: content)); + state.GeneratedSources.Add((sourceGeneratorType: generator, filename: $"{Hint}.g.cs", content)); } } \ No newline at end of file diff --git a/src/Valuify.Tests/Snippets/Snippets.cs b/src/Valuify.Tests/Snippets/Snippets.cs index 2d6546d..74bf6a6 100644 --- a/src/Valuify.Tests/Snippets/Snippets.cs +++ b/src/Valuify.Tests/Snippets/Snippets.cs @@ -22,6 +22,13 @@ public IEnumerable Render(Arrangements target) } } + private static LanguageVersion Highest(LanguageVersion first, LanguageVersion second) + { + return first > second + ? first + : second; + } + private IEnumerable Compose() { if (Body.Length == 0) @@ -58,11 +65,4 @@ private IEnumerable Expect(Arrangements arrangements, IEnumerable< yield return new Expectations(contents, expectations, declaration.Minimum); } } - - private static LanguageVersion Highest(LanguageVersion first, LanguageVersion second) - { - return first > second - ? first - : second; - } } \ No newline at end of file