mocktail icon indicating copy to clipboard operation
mocktail copied to clipboard

Warning when a registerFallbackValue is never used

Open alestiago opened this issue 1 year ago • 0 comments

Description As a user I would like to get a warning whenever a fallback value has been registered but has never been used.

void main() {
    setUpAll(() {
      registerFallbackValue(Foo()); // Should result in a warning since it is never used.
    });
}

Possible solutions

  • Runtime warning
  • Custom analyser lint rule

Describe alternatives you've considered N/A

Additional context

  • https://invertase.io/blog/announcing-dart-custom-lint

alestiago avatar Sep 06 '22 08:09 alestiago