From 3dbf3a6ba72cf925d40ad54f560f8ca5d9dac11c Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:43:56 -0400 Subject: [PATCH] [Analyzers] Remove CA1309, CA1860-CA1865, CA1869, CA2208 from warning. --- src/.editorconfig | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/.editorconfig b/src/.editorconfig index 643e4c0846..6e5d31369f 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -105,4 +105,31 @@ dotnet_diagnostic.CA1859.severity = none dotnet_diagnostic.CA1716.severity = none # SYSLIB1096: Convert to 'GeneratedComInterface' -dotnet_diagnostic.SYSLIB1096.severity = silent \ No newline at end of file +dotnet_diagnostic.SYSLIB1096.severity = silent + +# CA1309: Use ordinal StringComparison +dotnet_diagnostic.CA1309.severity = suggestion + +# CA1860: Avoid using 'Enumerable.Any()' extension method +dotnet_diagnostic.CA1860.severity = suggestion + +# CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array +dotnet_diagnostic.CA1861.severity = suggestion + +# CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons +dotnet_diagnostic.CA1862.severity = suggestion + +# CA1863: Cache a CompositeFormat for repeated use in this formatting operation +dotnet_diagnostic.CA1863.severity = none + +# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method +dotnet_diagnostic.CA1864.severity = suggestion + +# CA1865: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char +dotnet_diagnostic.CA1865.severity = suggestion + +# CA1869: Cache and reuse 'JsonSerializerOptions' instances +dotnet_diagnostic.CA1869.severity = none + +# CA2208: Instantiate argument exceptions correctly +dotnet_diagnostic.CA2208.severity = none \ No newline at end of file