passsy / dart-lint

An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
Apache License 2.0
277 stars 82 forks source link

Why the lint is not working inside my test? #38

Open Katekko opened 3 years ago

Katekko commented 3 years ago

You can see the lint works above the test method but inside isn't

image

passsy commented 3 years ago

Which lint warning you do get outside the tests and which one do you expect inside the test?

Katekko commented 3 years ago

Totally my bad, even outside the test the lint don't work. The warning that I get outside is unusable variable, but inside the function I'm expecting "prefer const instead final". image

passsy commented 3 years ago

Please provide a minimum reproducible example. I can't verify that AuthMock.authenticateSuccessResponse is const

nilsreichardt commented 2 years ago

This is sometimes a problem with the Dart Analyzer. Restarting the Dart Analysis Server or just restarting VS Code fixes this problem for me.