Skip to content
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

fixes for CA2021 Do not call Enumerable.Cast<T> or Enumerable.OfType<T> false positives #6459

Merged
merged 4 commits into from
Feb 25, 2023

Conversation

fowl2
Copy link
Contributor

@fowl2 fowl2 commented Jan 27, 2023

fixes for #6457

@fowl2 fowl2 force-pushed the enumerablecasts-fix branch 4 times, most recently from d4984e5 to e9d1987 Compare January 31, 2023 14:00
@fowl2 fowl2 marked this pull request as ready for review January 31, 2023 14:02
@fowl2 fowl2 requested a review from a team as a code owner January 31, 2023 14:02
@fowl2 fowl2 force-pushed the enumerablecasts-fix branch from e9d1987 to 360f4b7 Compare January 31, 2023 14:09
@fowl2 fowl2 changed the title [WIP] fixes for CA2021 Do not call Enumerable.Cast<T> or Enumerable.OfType<T> false positives fixes for CA2021 Do not call Enumerable.Cast<T> or Enumerable.OfType<T> false positives Jan 31, 2023
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Merging #6459 (9184278) into main (50f62a9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6459    +/-   ##
========================================
  Coverage   96.41%   96.41%            
========================================
  Files        1371     1371            
  Lines      319011   319166   +155     
  Branches    10269    10270     +1     
========================================
+ Hits       307564   307719   +155     
+ Misses       8990     8989     -1     
- Partials     2457     2458     +1     

@fowl2 fowl2 force-pushed the enumerablecasts-fix branch 3 times, most recently from 62c085d to e2050cb Compare February 2, 2023 04:18
@fowl2
Copy link
Contributor Author

fowl2 commented Feb 2, 2023

(rebase/push to retrigger CI, as it failed with sporadic codecov problem)

@fowl2 fowl2 force-pushed the enumerablecasts-fix branch from e2050cb to 638e7d8 Compare February 2, 2023 07:13
Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix @fowl2, left a few NITs for typo, overall LGTM. Please also update the severity level back to RuleLevelBuildWarning.

fowl2 and others added 2 commits February 23, 2023 15:16
Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
@fowl2 fowl2 force-pushed the enumerablecasts-fix branch from 7d4f5a7 to 38bf4b4 Compare February 23, 2023 23:34
Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fowl2 LGTM, I will merge this after we disable the analyzer for test projects in runtime

@buyaa-n buyaa-n merged commit c6352bf into dotnet:main Feb 25, 2023
@github-actions github-actions bot added this to the vNext milestone Feb 25, 2023
@fowl2 fowl2 deleted the enumerablecasts-fix branch June 14, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants