From 9d4daf952af38a1d3a2181d6d28488fd5b6c1939 Mon Sep 17 00:00:00 2001 From: Lior Banai Date: Sat, 28 Oct 2023 18:06:30 +0300 Subject: [PATCH] Update editor config --- .editorconfig | 142 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index fa05938..ea23c51 100644 --- a/.editorconfig +++ b/.editorconfig @@ -237,7 +237,7 @@ dotnet_naming_style.begins_with_i.word_separator = dotnet_naming_style.begins_with_i.capitalization = pascal_case dotnet_diagnostic.SA1101.severity = silent dotnet_diagnostic.SA1513.severity = silent -dotnet_diagnostic.SA1600.severity = suggestion +dotnet_diagnostic.SA1600.severity = silent dotnet_diagnostic.SA1508.severity = error dotnet_diagnostic.SA1128.severity = silent dotnet_diagnostic.SA1516.severity = silent @@ -246,7 +246,7 @@ dotnet_diagnostic.MA0004.severity = silent dotnet_diagnostic.SA1117.severity = silent dotnet_diagnostic.MA0015.severity = silent dotnet_diagnostic.MA0026.severity = suggestion -dotnet_diagnostic.SA1202.severity = suggestion +dotnet_diagnostic.SA1202.severity = silent dotnet_diagnostic.SA1116.severity = silent dotnet_diagnostic.MA0051.severity = silent dotnet_diagnostic.SA1633.severity = silent @@ -258,7 +258,7 @@ dotnet_diagnostic.SA1507.severity = error dotnet_diagnostic.SA1505.severity = error dotnet_diagnostic.SA1400.severity = error dotnet_diagnostic.SA1503.severity = error -dotnet_diagnostic.SA1515.severity = error +dotnet_diagnostic.SA1515.severity = silent dotnet_diagnostic.SA1514.severity = error dotnet_diagnostic.SA1413.severity = error dotnet_diagnostic.SA1008.severity = error @@ -266,6 +266,124 @@ dotnet_diagnostic.SA1121.severity = error dotnet_diagnostic.SA1212.severity = error dotnet_diagnostic.SA1313.severity = error dotnet_diagnostic.CA1805.severity = error + +# Do not ignore method results +dotnet_diagnostic.CA1806.severity = error + +# Initialize reference type static fields inline +dotnet_diagnostic.CA1810.severity = error + +# Avoid uninstantiated internal classes +dotnet_diagnostic.CA1812.severity = warning + +# Avoid unsealed attributes +dotnet_diagnostic.CA1813.severity = error + +# Remove empty finalizers +dotnet_diagnostic.CA1821.severity = error + +# Avoid unused private fields +dotnet_diagnostic.CA1823.severity = error + +# Avoid zero-length array allocations +dotnet_diagnostic.CA1825.severity = warning + +# Use property instead of Linq Enumerable method +dotnet_diagnostic.CA1826.severity = warning + +# Do not use Count/LongCount when Any can be used +dotnet_diagnostic.CA1827.severity = suggestion + +# Do not use CountAsync/LongCountAsync when AnyAsync can be used +dotnet_diagnostic.CA1828.severity = suggestion + +# Use Length/Count property instead of Enumerable.Count method +dotnet_diagnostic.CA1829.severity = warning + +# Prefer strongly-typed Append and Insert method overloads on StringBuilder. +dotnet_diagnostic.CA1830.severity = warning + +# Use AsSpan instead of Range-based indexers for string when appropriate +dotnet_diagnostic.CA1831.severity = warning + +# Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array +dotnet_diagnostic.CA1832.severity = warning + +# Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array +dotnet_diagnostic.CA1833.severity = warning + +# Use StringBuilder.Append(char) for single character strings +dotnet_diagnostic.CA1834.severity = warning + +# Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes +dotnet_diagnostic.CA1835.severity = warning + +# Prefer IsEmpty over Count when available +dotnet_diagnostic.CA1836.severity = warning + +# Use Environment.ProcessId instead of Process.GetCurrentProcess().Id +dotnet_diagnostic.CA1837.severity = warning + +# Avoid StringBuilder parameters for P/Invokes +dotnet_diagnostic.CA1838.severity = warning + +# Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName +dotnet_diagnostic.CA1839.severity = warning + +# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId +dotnet_diagnostic.CA1840.severity = warning + +# Prefer Dictionary Contains methods +dotnet_diagnostic.CA1841.severity = warning + +# Do not use 'WhenAll' with a single task +dotnet_diagnostic.CA1842.severity = error + +# Do not use 'WaitAll' with a single task +dotnet_diagnostic.CA1843.severity = error + +# Provide memory-based overrides of async methods when subclassing 'Stream' +dotnet_diagnostic.CA1844.severity = warning + +# Use span-based 'string.Concat' +dotnet_diagnostic.CA1845.severity = warning + +# Prefer AsSpan over Substring +dotnet_diagnostic.CA1846.severity = warning + +# Use string.Contains(char) instead of string.Contains(string) with single character +dotnet_diagnostic.CA1847.severity = warning + +# Use the LoggerMessage delegates +dotnet_diagnostic.CA1848.severity = warning + +# Call async methods when in an async method +dotnet_diagnostic.CA1849.severity = error + +# Prefer static HashData method over ComputeHash +dotnet_diagnostic.CA1850.severity = error + +# Possible multiple enumerations of IEnumerable collection +dotnet_diagnostic.CA1851.severity = warning + +# Seal internal types +dotnet_diagnostic.CA1852.severity = error + +# Unnecessary call to 'Dictionary.ContainsKey(key)' +dotnet_diagnostic.CA1853.severity = error + +# Prefer the IDictionary.TryGetValue(TKey, out TValue) method +dotnet_diagnostic.CA1854.severity = error + +# Use Span.Clear() instead of Span.Fill() +dotnet_diagnostic.CA1855.severity = error + +# Use StartsWith instead of IndexOf +dotnet_diagnostic.CA1858.severity = error + +# Avoid using 'Enumerable.Any()' extension method +dotnet_diagnostic.CA1860.severity = error + dotnet_diagnostic.MA0134.severity = error dotnet_diagnostic.SA1408.severity = error dotnet_diagnostic.SA1210.severity = error @@ -273,6 +391,20 @@ dotnet_diagnostic.SA1122.severity = suggestion dotnet_diagnostic.SA1108.severity = silent dotnet_diagnostic.SA1012.severity = error dotnet_diagnostic.SA1500.severity = error +dotnet_diagnostic.SA1134.severity = silent +dotnet_diagnostic.SA1509.severity = error +dotnet_diagnostic.SA1002.severity = suggestion +dotnet_diagnostic.MA0003.severity = error +dotnet_diagnostic.MA0005.severity = error +dotnet_diagnostic.MA0010.severity = error +dotnet_diagnostic.MA0019.severity = error +dotnet_diagnostic.MA0012.severity = error +dotnet_diagnostic.MA0022.severity = error +dotnet_diagnostic.MA0028.severity = silent +dotnet_diagnostic.MA0044.severity = error +dotnet_diagnostic.MA0052.severity = error +dotnet_diagnostic.SA1139.severity = error +dotnet_diagnostic.SA1316.severity = error [*.{cs,vb}] dotnet_style_operator_placement_when_wrapping = beginning_of_line @@ -296,4 +428,6 @@ dotnet_style_predefined_type_for_locals_parameters_members = true:silent dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent dotnet_code_quality_unused_parameters = all:suggestion dotnet_diagnostic.CA2200.severity = error -dotnet_diagnostic.CA1012.severity = error \ No newline at end of file +dotnet_diagnostic.CA1012.severity = error +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_diagnostic.CA1806.severity = warning \ No newline at end of file