From 44e9a88fc5920d5dd04f9e9bddf3507860421c62 Mon Sep 17 00:00:00 2001 From: TylerCarrol <25536704+TylerCarrol@users.noreply.github.com> Date: Fri, 18 Sep 2026 10:14:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20[MegaLinter]=20Apply=20?= =?UTF-8?q?[1]=20automatic=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Helpers/VersionHelperTests.cs | 2 +- .../Arguments/Options/Specific/VersionArgument.cs | 4 +++- TJC.ConsoleApplication/Helpers/VersionHelper.cs | 12 +++++++----- TJC.ConsoleApplication/Settings/VersionType.cs | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/TJC.ConsoleApplication.Tests/Helpers/VersionHelperTests.cs b/TJC.ConsoleApplication.Tests/Helpers/VersionHelperTests.cs index 1fc3e93..42368b4 100644 --- a/TJC.ConsoleApplication.Tests/Helpers/VersionHelperTests.cs +++ b/TJC.ConsoleApplication.Tests/Helpers/VersionHelperTests.cs @@ -33,4 +33,4 @@ public void GetVersionUsesConfiguredVersionType(VersionType versionType, string ConsoleSettings.Instance.VersionType = VersionType.Version; } } -} \ No newline at end of file +} diff --git a/TJC.ConsoleApplication/Arguments/Options/Specific/VersionArgument.cs b/TJC.ConsoleApplication/Arguments/Options/Specific/VersionArgument.cs index bcf1e11..0e34d22 100644 --- a/TJC.ConsoleApplication/Arguments/Options/Specific/VersionArgument.cs +++ b/TJC.ConsoleApplication/Arguments/Options/Specific/VersionArgument.cs @@ -34,6 +34,8 @@ public class VersionArgument( private static void WriteVersionNumber() { var version = Assembly.GetEntryAssembly()?.GetVersion(); - ConsoleOutputHandler.WriteLine($"v{version.FormatVersion(ConsoleSettings.Instance.VersionDigits)}"); + ConsoleOutputHandler.WriteLine( + $"v{version.FormatVersion(ConsoleSettings.Instance.VersionDigits)}" + ); } } diff --git a/TJC.ConsoleApplication/Helpers/VersionHelper.cs b/TJC.ConsoleApplication/Helpers/VersionHelper.cs index 7c3497f..02718af 100644 --- a/TJC.ConsoleApplication/Helpers/VersionHelper.cs +++ b/TJC.ConsoleApplication/Helpers/VersionHelper.cs @@ -16,10 +16,12 @@ internal static class VersionHelper return ConsoleSettings.Instance.VersionType switch { VersionType.Version => assembly.GetName().Version?.ToString(), - VersionType.InformationalVersion => assembly.GetCustomAttribute()? - .InformationalVersion, - VersionType.FileVersion => assembly.GetCustomAttribute()? - .Version, + VersionType.InformationalVersion => assembly + .GetCustomAttribute() + ?.InformationalVersion, + VersionType.FileVersion => assembly + .GetCustomAttribute() + ?.Version, VersionType.ProductVersion => string.IsNullOrEmpty(assembly.Location) ? null : FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion, @@ -34,4 +36,4 @@ internal static class VersionHelper return parsedVersion.ToString(digits); } -} \ No newline at end of file +} diff --git a/TJC.ConsoleApplication/Settings/VersionType.cs b/TJC.ConsoleApplication/Settings/VersionType.cs index f449bb2..53ee62c 100644 --- a/TJC.ConsoleApplication/Settings/VersionType.cs +++ b/TJC.ConsoleApplication/Settings/VersionType.cs @@ -24,4 +24,4 @@ public enum VersionType /// The product version from the file version information. /// ProductVersion, -} \ No newline at end of file +}