Skip to content

feedback for the strict_top_level_inference lintΒ #59746

@devoncarew

Description

@devoncarew

This is general feedback for the strict_top_level_inference lint; cc @srawlins.

In order to try this out, I made a custom version of package:lints/core.yaml and ran it on the sdk repo. Some notes:

  • it found 24,835 issues
  • 24,374 of them were in test code (so, all, but 100 issues)
  • from spot checking them, many of them involved a test method that did not have a type annotation (so, tests not as closure but as individual methods; test_functionTypedFormalParameter() async { ... })
  • for these cases it would be useful to have a quick fix that added a return type (for many of these cases, this would be void, or Future, or Future<void>).

I think all the cases it fired on were legit. My main feedback from above is that a quick fix would be useful :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixestype-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