From 6db77c4edafb6a871d9b8550c2119e6b6acd8b51 Mon Sep 17 00:00:00 2001 From: Gabriel Weyer Date: Sat, 26 Oct 2024 09:07:55 +1100 Subject: [PATCH] Fix up warnings --- coster/src/AzureVmCoster/Program.cs | 2 ++ coster/tests/AzureVmCosterTests/Services/ArgumentReaderTests.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/coster/src/AzureVmCoster/Program.cs b/coster/src/AzureVmCoster/Program.cs index fd4ee6c..5c7cfb5 100644 --- a/coster/src/AzureVmCoster/Program.cs +++ b/coster/src/AzureVmCoster/Program.cs @@ -30,7 +30,9 @@ public static async Task Main(string[] args) return 0; } +#pragma warning disable CA1031 // This is a catch-all so that we can log the exception catch (Exception e) +#pragma warning restore CA1031 { Console.WriteLine(e); return -1; diff --git a/coster/tests/AzureVmCosterTests/Services/ArgumentReaderTests.cs b/coster/tests/AzureVmCosterTests/Services/ArgumentReaderTests.cs index d28a979..338c315 100644 --- a/coster/tests/AzureVmCosterTests/Services/ArgumentReaderTests.cs +++ b/coster/tests/AzureVmCosterTests/Services/ArgumentReaderTests.cs @@ -27,7 +27,7 @@ public void GivenDoubleQuotePaths_ThenStripDoubleQuotes() var args = new[] { "-i", @"""C:\tmp\input.json""", "-c", @"""C:\tmp\input\config.json""" }; // Act - var (inputFilePath, configurationFilePath, culture) = ArgumentReader.Read(args); + var (inputFilePath, configurationFilePath, _) = ArgumentReader.Read(args); // Assert inputFilePath.Should().Be(@"C:\tmp\input.json");