We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you implement a class that inherits from List, RCS1080 does not get flagged when it should.
Product and Version Used: Visual Studio 2022 17.4.0 Roslynator 2022 v4.1.2
Steps to Reproduce:
class Program { static void Main(string[] args) { List<User> userList = new List<User>(); UserCollection userCollection = new UserCollection(); UserCollection2 userCollection2 = new UserCollection2(); if (userList.Any()) { Console.WriteLine(""); } if (userCollection.Any()) { Console.WriteLine(""); } if (userCollection2.Any()) { Console.WriteLine(""); } } } public class UserCollection : List<User> { } public class UserCollection2 : IList<User> { public User this[int index] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public int Count => throw new NotImplementedException(); public bool IsReadOnly => throw new NotImplementedException(); public void Add(User item) { throw new NotImplementedException(); } public void Clear() { throw new NotImplementedException(); } public bool Contains(User item) { throw new NotImplementedException(); } public void CopyTo(User[] array, int arrayIndex) { throw new NotImplementedException(); } public IEnumerator<User> GetEnumerator() { throw new NotImplementedException(); } public int IndexOf(User item) { throw new NotImplementedException(); } public void Insert(int index, User item) { throw new NotImplementedException(); } public bool Remove(User item) { throw new NotImplementedException(); } public void RemoveAt(int index) { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } } public class User { public string UserName { get; set; } public string EmailAddress { get; set; } }
There could be other analysers around list checks that I have not highlighted here.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
If you implement a class that inherits from List, RCS1080 does not get flagged when it should.
Product and Version Used:
Visual Studio 2022 17.4.0
Roslynator 2022 v4.1.2
Steps to Reproduce:
There could be other analysers around list checks that I have not highlighted here.
The text was updated successfully, but these errors were encountered: