diff --git a/src/CCVARN.Core/CCVARN.Core.csproj b/src/CCVARN.Core/CCVARN.Core.csproj index a9a4c99..fad1421 100644 --- a/src/CCVARN.Core/CCVARN.Core.csproj +++ b/src/CCVARN.Core/CCVARN.Core.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 8.0 + 9.0 enable false embedded diff --git a/src/CCVARN.Core/Configuration/ConfigSerializer.cs b/src/CCVARN.Core/Configuration/ConfigSerializer.cs index 7f08adc..28b425d 100644 --- a/src/CCVARN.Core/Configuration/ConfigSerializer.cs +++ b/src/CCVARN.Core/Configuration/ConfigSerializer.cs @@ -9,13 +9,13 @@ namespace CCVARN.Core.Configuration public static class ConfigSerializer { - private static readonly Lazy deseriazireBuilder = new Lazy(() => + private static readonly Lazy deseriazireBuilder = new(() => new DeserializerBuilder() .WithNamingConvention(HyphenatedNamingConvention.Instance)); private static readonly Encoding encoding = new UTF8Encoding(false); - private static readonly Lazy serializerBuilder = new Lazy(() => + private static readonly Lazy serializerBuilder = new(() => new SerializerBuilder() .WithNamingConvention(HyphenatedNamingConvention.Instance) .WithTypeInspector(inner => new CommentGatheringTypeInspector(inner)) diff --git a/src/CCVARN.Core/Models/NoteData.cs b/src/CCVARN.Core/Models/NoteData.cs index cba0cfb..c3e6c88 100644 --- a/src/CCVARN.Core/Models/NoteData.cs +++ b/src/CCVARN.Core/Models/NoteData.cs @@ -32,7 +32,7 @@ public NoteData(string type, string summary, string scope) public override bool Equals(object? obj) { - if (!(obj is NoteData data)) + if (obj is not NoteData data) return false; var result = Type == data.Type; result = result && Scope == data.Scope; diff --git a/src/CCVARN.Core/Parser/CommitParser.cs b/src/CCVARN.Core/Parser/CommitParser.cs index d571320..220f6ea 100644 --- a/src/CCVARN.Core/Parser/CommitParser.cs +++ b/src/CCVARN.Core/Parser/CommitParser.cs @@ -60,7 +60,7 @@ public IEnumerable GetAllCommits() this._writer.RemoveIndent(); } - if (!(commitInfo is null)) + if (commitInfo is not null) { yield return commitInfo; } diff --git a/src/CCVARN.Core/Parser/VersionParser.cs b/src/CCVARN.Core/Parser/VersionParser.cs index bc28b74..c3a9d87 100644 --- a/src/CCVARN.Core/Parser/VersionParser.cs +++ b/src/CCVARN.Core/Parser/VersionParser.cs @@ -34,7 +34,7 @@ public VersionData ParseVersion(VersionData? version, CommitInfo commit) if (commit.IsTag) return newVersion; // We should not parse the commit for version increment on tagged releases - if (!(commit is ConventionalCommitInfo conventionalCommit)) + if (commit is not ConventionalCommitInfo conventionalCommit) return newVersion; if (conventionalCommit.IsBreakingChange) diff --git a/src/CCVARN/CCVARN.csproj b/src/CCVARN/CCVARN.csproj index 83eb73a..8f49d46 100644 --- a/src/CCVARN/CCVARN.csproj +++ b/src/CCVARN/CCVARN.csproj @@ -3,7 +3,7 @@ Exe net50;netcoreapp3.1 - 8.0 + 9.0 enable true dotnet-ccvarn @@ -24,7 +24,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/CCVARN/Program.cs b/src/CCVARN/Program.cs index d5e3b58..7df7d7f 100644 --- a/src/CCVARN/Program.cs +++ b/src/CCVARN/Program.cs @@ -18,7 +18,7 @@ namespace CCVARN internal static class Program { - public static Task Main(string[] args) + public static async Task Main(string[] args) { var container = CreateContainer(); var console = container.Resolve(); @@ -46,7 +46,7 @@ public static Task Main(string[] args) .GetCustomAttribute()!.InformationalVersion; if (version.IndexOf('+', StringComparison.Ordinal) > 0) - version = version.Substring(0, version.IndexOf('+', StringComparison.Ordinal)); + version = version[..version.IndexOf('+', StringComparison.Ordinal)]; console.WriteInfoLine(text, version); @@ -73,7 +73,7 @@ public static Task Main(string[] args) }); //app.SetDefaultCommand(); - return app.RunAsync(args); + return await app.RunAsync(args); } finally { diff --git a/tests/CCVARN.Core.Tests/CCVARN.Core.Tests.csproj b/tests/CCVARN.Core.Tests/CCVARN.Core.Tests.csproj index e6a4629..8e73906 100644 --- a/tests/CCVARN.Core.Tests/CCVARN.Core.Tests.csproj +++ b/tests/CCVARN.Core.Tests/CCVARN.Core.Tests.csproj @@ -2,7 +2,7 @@ net5.0;netcoreapp3.1 false - 8.0 + 9.0