Skip to content

Consider suggesting spelling fixes for unrecognized pubspec keys #4529

Open
@jakemac53

Description

@jakemac53

I recently helped somebody diagnose an issue where their dependency overrides weren't working, and they had just left off the s.

I realize that pub cannot more generally error on keys it doesn't recognize, but it could potentially check if unrecognized keys are within a close edit distance of a known key, and in that case give a warning about the likely misspelling.

See package:args as an example https://github.com/dart-lang/core/blob/0b2bd3fcd7f3e082f4cc9b14c19ffa93894b85ae/pkgs/args/lib/command_runner.dart#L526C5-L526C18

Metadata

Metadata

Assignees

No one assigned

    Labels

    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