-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
It would be nice to have a lint to catch uses of the expect from package:test where the expected and actual arguments do not have compatible types. Right now both parameters are typed as dynamic so the type system doesn't really help. But it's uncommon for the objects to be equal if the types are not at least assignable. For example,
expect(3, ''); // LINT
When omitting types from local variables it's easy for changes elsewhere to cause the variable's type to change, which can lead to test failures. It would be nice to find these during analysis rather than during test execution.
pq and FMorschel
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug