-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "linter: Refactor prefer_collection_literals to use context ty…
…pe more" This reverts commit cd8a337. Reason for revert: lint starts barking at the wrong tree: b/298917960 Original change's description: > linter: Refactor prefer_collection_literals to use context type more > > There is a basic premise in this rule which we cannot satisfy exactly: > we need to disallow `LinkedHashSet()` unless the context type requires > the developer to use `LinkedHashSet`. But the context type is long > gone when the lint rule is run. > > This CL adds some logic to try to attempt figuring out the context > type in the cases where users have filed bugs, but it will never be > super accurate. > > Fixes dart-lang/linter#4736 > Fixes dart-lang/linter#3057 > Fixes dart-lang/linter#1649 > Fixes dart-lang/linter#2795 > > Change-Id: I3e6c6de81084dca2825488c89830ab3e7ea63186 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323680 > Reviewed-by: Phil Quitslund <pquitslund@google.com> > Reviewed-by: Konstantin Shcheglov <scheglov@google.com> > Commit-Queue: Samuel Rawlins <srawlins@google.com> Change-Id: I980053dd51ffd4447721e0ad7436b07ca704b554 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324021 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Ilya Yanok <yanok@google.com>
- Loading branch information
Ilya Yanok
committed
Sep 4, 2023
1 parent
44bcd89
commit cbdae14
Showing
5 changed files
with
93 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.