-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable NetAnalyzers reliability and globalization rules
The following rules led to code changes: - CA2000: Dispose objects before losing scope - CA2012: Use ValueTasks correctly - CA2008: Do not create tasks without passing a TaskScheduler - CA2016: Forward the 'CancellationToken' parameter to methods that take one - CA1310: Specify StringComparison for correctness - CA1309: Use ordinal stringcomparison - CA1304: Specify CultureInfo Part of #18870
- Loading branch information
Showing
55 changed files
with
170 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Code analysis rules and configuration | ||
|
||
root = false | ||
|
||
# Code files | ||
[*.cs] | ||
|
||
# Globalization rules | ||
|
||
# CA1303: Do not pass literals as localized parameters | ||
dotnet_diagnostic.CA1303.severity = none | ||
|
||
# CA1304: Specify CultureInfo | ||
dotnet_diagnostic.CA1304.severity = error | ||
|
||
# CA1305: Specify IFormatProvider | ||
dotnet_diagnostic.CA1305.severity = none | ||
|
||
# CA1307: Specify StringComparison for clarity | ||
dotnet_diagnostic.CA1307.severity = none | ||
|
||
# CA1308: Normalize strings to uppercase | ||
dotnet_diagnostic.CA1308.severity = none | ||
|
||
# CA1309: Use ordinal stringcomparison | ||
dotnet_diagnostic.CA1309.severity = error | ||
|
||
# CA1310: Specify StringComparison for correctness | ||
dotnet_diagnostic.CA1310.severity = error | ||
|
||
# CA2101: Specify marshaling for P/Invoke string arguments | ||
dotnet_diagnostic.CA2101.severity = error | ||
|
||
# Reliability Rules | ||
|
||
# CA2000: Dispose objects before losing scope | ||
# Not reliable enough - false positives | ||
dotnet_diagnostic.CA2000.severity = suggestion | ||
|
||
# CA2002: Do not lock on objects with weak identity | ||
dotnet_diagnostic.CA2002.severity = error | ||
|
||
# CA2007: Consider calling ConfigureAwait on the awaited task | ||
dotnet_diagnostic.CA2007.severity = error | ||
|
||
# CA2008: Do not create tasks without passing a TaskScheduler | ||
dotnet_diagnostic.CA2008.severity = error | ||
|
||
# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value | ||
dotnet_diagnostic.CA2009.severity = error | ||
|
||
# CA2011: Avoid infinite recursion | ||
dotnet_diagnostic.CA2011.severity = error | ||
|
||
# CA2012: Use ValueTasks correctly | ||
dotnet_diagnostic.CA2012.severity = error | ||
|
||
# CA2013: Do not use ReferenceEquals with value types | ||
dotnet_diagnostic.CA2013.severity = error | ||
|
||
# CA2014: Do not use stackalloc in loops | ||
dotnet_diagnostic.CA2014.severity = error | ||
|
||
# CA2015: Do not define finalizers for types derived from MemoryManager<T> | ||
dotnet_diagnostic.CA2015.severity = error | ||
|
||
# CA2016: Forward the 'CancellationToken' parameter to methods that take one | ||
dotnet_diagnostic.CA2016.severity = error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
src/EFCore.Relational/Extensions/RelationalTaskExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.