Skip to content

Consider adding unnecessary_statements to recommended #793

Open
@natebosch

Description

@natebosch

This lint does tend to help catch mistakes, but it has a small false positive rate because there are legitimate cases to call a getter for it's side effects.

We had some discussion about an annotation to mark getters as having side effects to suppress this lint, but nothing has landed.
dart-lang/sdk#35513

It seems like the current practice is to use // ignore: comments, and we've so far avoided adding lints with known false positives that can't be suppressed in a nicer way than an ignore.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    More investigation needed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions