linter icon indicating copy to clipboard operation
linter copied to clipboard

Fix false negative in `prefer_is_empty`

Open asashour opened this issue 3 years ago • 3 comments

Fixes #2818

I hope it is fine to do this change, since not evaluating constants deliberately in the old TODO, I guess it was added to retain the old behavior in the other PR.

asashour avatar Jul 30 '21 18:07 asashour

Coverage Status

Coverage remained the same at 93.976% when pulling 7930f25e8eae5385049fea1b204ef13634d83558 on asashour:2818_prefer_is_empty into def6bf20f22a8b974673606a942f392700efef31 on dart-lang:master.

coveralls avatar Jul 30 '21 18:07 coveralls

I suspect that there was a reason why the TODO wasn't addressed before committing the lint, but I don't know / remember what it was. I think that Phil is out today, so this will need to wait until he's back.

bwilkerson avatar Jul 30 '21 18:07 bwilkerson

Brian is right. This change has the potential to introduce a bunch of new diagnostics internally and so we need to proceed with caution. It's generally true of false negatives that they need to be landed with care since they can potentially be very impactful on the ecosystem.

pq avatar Aug 02 '21 04:08 pq

I commented on the issue - I am against such a change :( https://github.com/dart-lang/linter/issues/2818#issuecomment-1337225760

oprypin avatar Dec 05 '22 12:12 oprypin

Closing this as it is stale and needs more background work, see the referenced issue.

mosuem avatar Mar 12 '24 12:03 mosuem