From 13e2b547122aa352605e904c3dffe02a6da21305 Mon Sep 17 00:00:00 2001 From: Evgeny Gorbovoy Date: Sat, 30 Nov 2024 20:09:56 +0100 Subject: [PATCH] CA1303 disabled (#157) --- src/.editorconfig | 1 + .../Infrastructure/InputLessDefaultNetConsole.cs | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/.editorconfig b/src/.editorconfig index dc887c0f..fdd34561 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -79,6 +79,7 @@ dotnet_diagnostic.ca2213.severity = none # keeping field does not mean necessari dotnet_diagnostic.ca2248.severity = none # https://github.com/dotnet/roslyn-analyzers/issues/4432 dotnet_diagnostic.ca1062.severity = none # we are fine with NRE - no need for additional checks dotnet_diagnostic.ca1065.severity = none # senseless rules. Any code in .NET is executed in context of possible exceptions. Exception can happen anywhere +dotnet_diagnostic.CA1303.severity = none # we are assuming not to display any user-text. For the moment we are not supporting localization for exception messages dotnet_diagnostic.cs0067.severity = warning dotnet_diagnostic.cs0078.severity = warning dotnet_diagnostic.cs0108.severity = warning diff --git a/src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs b/src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs index 96260749..cb6fc80e 100644 --- a/src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs +++ b/src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs @@ -18,7 +18,6 @@ public class InputLessDefaultNetConsole : IConsole private bool _caretVisible; private PixelBufferCoordinate _headBufferPoint; -#pragma warning disable CA1303 // Do not pass literals as localized parameters protected InputLessDefaultNetConsole() { Console.OutputEncoding = Encoding.UTF8; @@ -38,7 +37,6 @@ protected InputLessDefaultNetConsole() ActualizeSize(); } -#pragma warning restore CA1303 // Do not pass literals as localized parameters protected bool Disposed { get; private set; } @@ -143,9 +141,7 @@ public void Dispose() { Dispose(true); GC.SuppressFinalize(this); -#pragma warning disable CA1303 // Do not pass literals as localized parameters Console.Write(ConsoleUtils.DisableAlternateBuffer); -#pragma warning restore CA1303 // Do not pass literals as localized parameters } public void ClearOutput()