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

New rule S6608: Indexing should be used instead of "Enumerable" methods on types implementing "IList" #7125

Closed
costin-zaharia-sonarsource opened this issue Apr 27, 2023 · 1 comment · Fixed by #7179
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: New Rule Implementation for a rule that HAS been specified.
Milestone

Comments

@costin-zaharia-sonarsource
Copy link
Member

costin-zaharia-sonarsource commented Apr 27, 2023

https://sonarsource.github.io/rspec/#/rspec/S6608/csharp

MMF-3069

@costin-zaharia-sonarsource costin-zaharia-sonarsource added Area: VB.NET VB.NET rules related issues. Area: C# C# rules related issues. Type: New Rule Implementation for a rule that HAS been specified. labels Apr 27, 2023
@costin-zaharia-sonarsource costin-zaharia-sonarsource added this to the 9.1 milestone Apr 27, 2023
@costin-zaharia-sonarsource costin-zaharia-sonarsource changed the title Indexing should be used instead of "Enumerable" methods on types implementing "IList" New rule S6608: Indexing should be used instead of "Enumerable" methods on types implementing "IList" Apr 27, 2023
@snakefoot
Copy link

snakefoot commented May 4, 2023

Consider also IReadOnlyList<T>, and notice some Linq-Enumerable-extension-methods are already casting for performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: New Rule Implementation for a rule that HAS been specified.
Projects
None yet
4 participants