Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShreyas Jejurkar <shreyasjejurkar123@live.com>2022-02-05 09:42:33 +0300
committerShreyas Jejurkar <shreyasjejurkar123@live.com>2022-02-05 09:42:33 +0300
commit877672776e9e2e41ecc2d1386742b0113f5ab987 (patch)
treedbe70e0727d310f61fc190004c4b37e840a38e0d /.editorconfig
parentdfb9a5b4e48260297ee477a99ae42995822e9bde (diff)
Refactor : Enable CA2249
1. Enables CA2249 2. formatted `.editorconfig`
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig34
1 files changed, 34 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
index 3151862d60..86b8e33df1 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -77,6 +77,9 @@ charset = utf-8-bom
[*.{cs,vb}]
+# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
+dotnet_diagnostic.CA2249.severity = warning
+
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = warning
@@ -251,52 +254,79 @@ dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_diagnostic.IDE2000.severity = warning
[**/{test,samples,perf}/**.{cs,vb}]
+
+# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
+dotnet_diagnostic.CA2249.severity = warning
+
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = suggestion
+
# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = suggestion
+
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = suggestion
+
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = suggestion
+
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = suggestion
+
# CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = suggestion
+
# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = suggestion
+
# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = suggestion
+
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = suggestion
+
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = suggestion
+
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = suggestion
+
# CA1837: Use 'Environment.ProcessId'
dotnet_diagnostic.CA1837.severity = suggestion
+
# CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = suggestion
+
# CA1841: Prefer Dictionary.Contains methods
dotnet_diagnostic.CA1841.severity = suggestion
+
# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = suggestion
+
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = suggestion
+
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = suggestion
+
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = suggestion
+
# CA2012: Use ValueTask correctly
dotnet_diagnostic.CA2012.severity = suggestion
+
# IDE0005: Remove unnecessary usings
dotnet_diagnostic.IDE0005.severity = suggestion
+
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = suggestion
+
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = suggestion
+
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = suggestion
+
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = suggestion
@@ -308,12 +338,16 @@ dotnet_diagnostic.CA2016.severity = suggestion
[{**/Shared/runtime/**.{cs,vb},src/Shared/test/Shared.Tests/runtime/**.{cs,vb},**/microsoft.extensions.hostfactoryresolver.sources/**.{cs,vb}}]
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = silent
+
# IDE0011: Use braces
dotnet_diagnostic.IDE0011.severity = silent
+
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = silent
+
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = silent
+
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent