solid-software / solid_lints

🟧 Lints for Dart and Flutter based on software industry standards and best practices.
Other
36 stars 18 forks source link

avoid-unused-parameters does not report parameters from typedef #58

Closed DenisBogatirov closed 5 months ago

DenisBogatirov commented 11 months ago

Rule should report positional parameters from typedef if their name are not underscores.

Code below represents expected behavior.

typedef MaxFun = int Function(int a, int b);

// expect_lint: avoid-unused-parameters
final MaxFun maxFunLint = (int a, int b) => 1;

final MaxFun maxFunOk = (int _, int __) => 1;