Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[BUG] avoid-dynamic doesn't warn about implicit dynamic in function parameters #750

Closed
DetachHead opened this issue Mar 20, 2022 · 3 comments
Assignees
Labels
area-core awaiting info Requires more information from the customer to progress type: question Further information is requested

Comments

@DetachHead
Copy link

  • Dart code metrics version: 4.13.0
  • Dart sdk version: 2.16.1

Please show your full configuration:

Configuration
analyzer:
  plugins:
    - dart_code_metrics

dart_code_metrics:
  rules:
    - avoid-dynamic

What did you do? Please include the source code example causing the issue.

void foo(a) {
  print(a);
}

What did you expect to happen?
warning on a parameter
What actually happened?
no warning

>flutter pub run dart_code_metrics:metrics analyze lib
✔ no issues found!

image

@KotlinIsland
Copy link

KotlinIsland commented Mar 20, 2022

dynamic: No way! That's nonsafe (safety-denying) typing.

@incendial
Copy link
Member

You should have a build-in check for dynamics:
Screenshot 2022-03-22 at 21 18 06

Can be set up with implicit-dynamic:
Screenshot 2022-03-22 at 21 19 27

@incendial incendial added type: question Further information is requested area-core awaiting info Requires more information from the customer to progress labels Mar 22, 2022
@DetachHead
Copy link
Author

thanks! seems that rule wasn't documented anywhere (dart-lang/sdk#48650)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core awaiting info Requires more information from the customer to progress type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants