Skip to content

Ignore variables named _, __, ... even when implicit-dynamic:false #26915

Closed
@zoechi

Description

@zoechi

These names are usually used for unused parameters.

image

In Polymer apps I have a lot of methods where a specific signature is expected by Polymer but the parameters passed by default are often not relevant:

  @reflectable
  void searchStringChanged(_, [__]) {
    if (dataView == null) {
      return;
    }
    updateFilter();
  }

adding dynamic everywhere is cumbersome for something that should communicate that it is unused

  void searchStringChanged(dynamic _, [dynamic __]) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.type-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