-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable new analyzers CA1862, CA1864 in runtime and fix findings. #88700
Conversation
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsEnable new analyzers CA1862, CA1864 in runtime and fix findings.
|
@@ -577,9 +577,11 @@ private void ApplyPublishProperties(ITaskItem newAsemblyAsset) | |||
|
|||
foreach (var candidate in resolvedFilesToPublish) | |||
{ | |||
#pragma warning disable CA1864 // Prefer the 'IDictionary.TryAdd(TKey, TValue)' method. Dictionary.TryAdd() not available in .Net framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to if-def .Net framework build and apply the fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for enabling it. I am not expecting any hits from CA1862 in the runtime repo.
...ies/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/AggregationManager.cs
Outdated
Show resolved
Hide resolved
All failures are unrelated and known |
Enable new analyzers CA1862, CA1864 in runtime and fix findings.
Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons
Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
, thanks to @CollinAlpert