-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
RCS1077 for Select(x => x) #1490
Comments
|
@BenjaminBrienen This one can be tricky. In same cases it may be possible to just remove the call but there will be cases where the call is there intentionally to change return from whatever to |
Good point. |
@josefpihrt Could we have 2 code fixes? One that suggests to remove it and another one that suggests AsEnumerable()? |
Yes, there can be two fixes, but you still have an issue how to determine which one it is. |
I was imagining that the user would just pick one of the two suggestions. Another strategy would be: We could always suggest |
Actually, return list.Select(x => x); If you change it to return list.AsEnumerable(); Caller will have direct access to list which was not possible before. |
RCS1077 should recommend removing
.Select(x => x)
.The text was updated successfully, but these errors were encountered: