Skip to content

collection_methods_unrelated_type does not cover Set.containsAll #60227

@FaFre

Description

@FaFre

At the moment collection_methods_unrelated_type does only work on the defined rules of:

An argument passed to a collection method should relate to the collection type as follows:

    an argument to Iterable<E>.contains should be related to E
    an argument to List<E>.remove should be related to E
    an argument to Map<K, V>.containsKey should be related to K
    an argument to Map<K, V>.containsValue should be related to V
    an argument to Map<K, V>.remove should be related to K
    an argument to Map<K, V>.[] should be related to K
    an argument to Queue<E>.remove should be related to E
    an argument to Set<E>.lookup should be related to E
    an argument to Set<E>.remove should be related to E

bool containsAll( Iterable<Object?> other ) is not supported yet (https://api.dart.dev/dart-core/Set/containsAll.html).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagetype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions