Commit graph

921 commits

Author SHA1 Message Date
Danny Tuppeny c3d80286fe [analysis_server] Add a supportsUris client capability for legacy server to switch into URI mode
This adds support for the legacy server to switch to URIs using a client capability. In this mode, all "FilePaths" will be URI strings over the protocol (in both directions).

It also allows the server to send LSP notifications (wrapped inside an "lsp.notification" notification, matching how requests/responses work). Notifications are automatically enabled if the client uses any LSP methods or sends the new "supportsUris" capability.

Change-Id: I5d2b76e396862129c61de70d57397603c958a02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349120
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 22:19:00 +00:00
Danny Tuppeny 8d936d38fc [analysis_server]/[analyzer_plugin] Make all toJson/fromJson methods go through a central converstion for Path<->URI Strings
This change shouldn't change any current behaviour, but means all "FilePath" types in the legacy protocol spec will go through a (currently no-op) conversion. The server will be able to replace this conversion based on client capabilities in a future CL.

Because a lot of the generated classes are in analyzer_plugin, this also moves the ClientUriConverter class there.

`pkg\analysis_server\test\src\utilities\json_test.dart` contains tests that the toJson/fromJson methods go through the converter recursively (inc. map keys/values/etc.).

Change-Id: If5aec884070128eea594540fd25a9017ada86079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349060
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-30 16:58:25 +00:00
pq bc34c295ae final -> var for package:analyzer_plugin
Change-Id: I0e7cd26dcb0c7de1b4f7e19b66719d5a73670ce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345824
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-12 22:37:40 +00:00
Greg Spencer e49f1ccbbe Fix the way that DartFileEditBuilder handles imports
It also handles imports a little better than it used to: it will replace an import that has the same URI and prefix with an updated one with appropriate show and hide combinators.

Bug: https://github.com/dart-lang/sdk/issues/54496
Change-Id: Ib53275f2d58c19085fe02cb83267c8dc0c23838b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344940
Commit-Queue: Greg Spencer <gspencer@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Greg Spencer <gspencer@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-12 19:30:12 +00:00
Sam Rawlins 5ddb91860b analyzer: Close the ReceiverPort in PluginIsolateChannel.close
Change-Id: I7442da58ba9e6810bacc6380999097a3d9674658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-04 18:38:36 +00:00
Sam Rawlins 28ca02d3a0 Remove WithoutNullSafety tests in DAS and analyzer_plugin tests
Change-Id: I3ea9e767ff49b16a8dcdec5540a6b2d68f414930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-11-27 21:40:11 +00:00
Sam Rawlins 73ab31b98a analyzer: Move the Source class to be public API.
Deprecate accessing LineInfo, Source, or SourceRange via the
old library (pkg/analyzer/lib/src/generated/source.dart).
Migrate all SDK code to the new library.

Fixes https://github.com/dart-lang/sdk/issues/46420

Change-Id: Ic7c98a5820415c92a457f9fa2756351b05520cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-14 17:10:37 +00:00
Devon Carew 6917656134 [pkg] remove duplicate config from the analysis options files
Change-Id: I149a97bbe260600a3de664b28c4d212dd9adb889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335862
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-11-14 00:37:53 +00:00
pq f962700302 + flutter_style_todos
Enabled `flutter_style_todos` in analyzer packages:

* `analyzer_cli`
* `analyzer_plugin`
* `analyzer_utilities`
* `meta`


Change-Id: I5fcd76bfa5a3bdeb14d6a81b8193129c6d83d0e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335405
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-13 00:14:09 +00:00
pq 9e6c856c27 migrate to getAnalysisOptionsForFile(file)
This migrates the bulk of the calls to `.analysisOptions`. I'll tackle the remainder in a few follow-ups.

Change-Id: I0f4c78d88938feecaba7202e0dc299dc17e2bb35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334647
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-08 21:48:38 +00:00
Danny Tuppeny 4d9c40860f [analysis_server] Add support for LSP Document Links for example/api links
This extracts the code that finds "examples/api" paths in code from the navigation code so that it can be re-used by LSP's DocumentLink request.

This allows the links to be more visible in the editor (they are underlined and clearly clickable like hyperlinks, whereas definition required you to hover and hold Ctrl before you'd seen an underline in VS Code).

Example: https://github.com/Dart-Code/Dart-Code/assets/1078012/be9db467-dbc9-4206-9dd5-f8ca72d95596

There may be an argument for making this more general (so that links other than example/api could be detected) but for now the goal was to make these existing links more obvious.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4186

Change-Id: Id00425175b24394e565e13406ea4bac5691d2c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333082
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-02 15:51:49 +00:00
Brian Wilkerson 7da4e0b9e8 Complete in the representation field
Change-Id: I6906296b57c2cdd516ecc045ee78d74b4493e217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331096
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-19 21:08:32 +00:00
Brian Wilkerson 67e888113b Code complete inside an extension type
Change-Id: I293d1379561abdce3816dccaa6dfde867e0ed9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330998
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-19 14:04:51 +00:00
Devon Carew e2fe203adc [deps] roll package:lints to the latest
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-05 03:36:59 +00:00
Devon Carew 3b0b1bd863 Bump package:lints to the latest; address instances of new lints.
Changes:
```
> git log --format="%C(auto) %h %s" 8d5f750..b044aca
 https://dart.googlesource.com/lints.git/+/b044aca add several rules to core and recommended (150)
 https://dart.googlesource.com/lints.git/+/81100a2 fix a dangling table link (146)
```

Diff: https://dart.googlesource.com/lints.git/+/8d5f7500024320654adb1e799e49fc10c5304ae7..b044acab9f6669b3d8e781923a8ff86877801177/
Change-Id: I031333ade99af700a7009b14a36d3aadba12fc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327321
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-25 21:15:15 +00:00
Danny Tuppeny bf13d89902 [analysis_server] Ensure variables declared in patterns are recorded in navigation data
Previously the pattern would only be recorded as a reference to the getter. If there was a reference to the declared variable elsewhere in the visited code, it would then record the variable declaration (via the reference).

In LSP, we locate declarations by only looking at the node at the cursor, so we can't rely on the declaration being recorded by some other reference (if one even exists) so this ensure it is recorded explicitly.

Fixes https://github.com/dart-lang/sdk/issues/53554.

Change-Id: I8983d0637f2d89a427fb1fa11293eec8e06fede8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-09-19 19:39:31 +00:00
Konstantin Shcheglov db212846ed Extension type. Create navigation regions for primary constructor and representation field.
Change-Id: I491780daa376941d031bba6dd7da60655ec3e76e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-07 18:20:50 +00:00
Konstantin Shcheglov bbc3dcbe30 Extension type. Tests for type hierarchy.
Change-Id: Ic0e31bb13efd68a3413429d1ff9110bb9b268e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323432
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-30 21:18:25 +00:00
Danny Tuppeny 1bae1b3dd5 [analysis_server] Don't produce fix-all-in-file fixes when there's no individual fix
Fixes https://github.com/dart-lang/sdk/issues/53021

Change-Id: I674430c5e01eaeaee7867e85795eca2250ec14f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-08 18:20:39 +00:00
Danny Tuppeny 7f0ac7853e [analysis_server] Fix navigation for the offset between a type name and generic type args
Fixes https://github.com/Dart-Code/Dart-Code/issues/4619

Change-Id: I5cee17037fe4531183dc5e2cb566e9f020e1b541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-06 17:37:27 +00:00
Konstantin Shcheglov 508a293029 Revert a few not published API changes.
Change-Id: I093c3d3f6e221cfe874e82b598f52087670ce24e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318020
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-04 19:21:58 +00:00
Konstantin Shcheglov ce7164488a Extension types. Semantic highlighting.
Change-Id: I46cde8151965e209a230df811592f8498e93c218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318161
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-04 19:13:43 +00:00
Sam Rawlins 734ba443a7 Prepare analyzer_plugin 0.11.3
My plan is to checkout the SDK when analyzer 6.0.0 was published,
then cherry-pick this commit, and publish analyzer_plugin.

In a test run, the package analyzes cleanly and all tests pass.

Bug: https://github.com/dart-lang/sdk/issues/52769
Change-Id: I10661dd665c612eeb82977bdf2f8432e022044b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-08-02 19:37:58 +00:00
Martin Kustermann 11d820890e Use utf8.encode() instead of longer const Utf8Encoder.convert()
The change in [0] has propagated now everywhere, so we can use
`utf8.encode()` instead of the longer `const Utf8Encoder.convert()`.

As the checked-in SDK has been rolled to include [0] we can now rely on
the better return type.

[0] https://github.com/dart-lang/sdk/issues/52801

TEST=ci

CoreLibraryReviewExempt: Minor cleanup.
Change-Id: I2c0144023e03b2c265582d83a7fb9469b02f1570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313563
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-07-24 09:28:38 +00:00
Konstantin Shcheglov 4bb8312b4a Revert "Move API declarations of elements into src/, re-export."
This reverts commit 43db92d9ed.


Revert "Tweaks for comments of classes around augmentations."

This reverts commit 6d0fb5094f.

Change-Id: I9508169158d536302579346defebf696edfe4bec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-23 16:43:30 +00:00
Konstantin Shcheglov 43db92d9ed Move API declarations of elements into src/, re-export.
In following CLs I plan to add `final` and `sealed` modifiers.

Change-Id: Ia6b9091034ed9f8f6f8576dbe6029d7e72a9d6b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315249
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-21 16:05:21 +00:00
Konstantin Shcheglov 8828fee865 Deprecate ExecutableElement.returnType, use returnType2 instead.
Change-Id: Ibd29c3fbec0439236c2cf45c57f820c45427df9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311932
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-29 23:16:59 +00:00
Konstantin Shcheglov fae9e418ea Deprecate Element.enclosingElement, use enclosingElement2 instead.
Change-Id: I78edb6d433949eb8bd86f397fb873a078edf9fc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311827
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-29 19:45:19 +00:00
Konstantin Shcheglov a8a3f3f77e [CMSR] Improve 'get invocation' implementation.
Change-Id: I871eddc1727ea6a51e169f4031d55ba3bc93527d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 14:38:38 +00:00
Konstantin Shcheglov 6a4f127831 [CMSR] Not available if external executable element.
Change-Id: Icf209c8cd844918a62195f8a024f0c0b8922f0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 19:51:58 +00:00
Konstantin Shcheglov edd17a8638 Merge AST interfaces into implementation library, re-export.
Bug: https://github.com/dart-lang/language/issues/3135
Change-Id: Icbc2a4e506e9e58c830b53f7aecce92189bb2d1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-10 16:57:59 +00:00
Danny Tuppeny a3399e3616 [analysis_server] Add support for adding imports with show/hide + update Move to File
Change-Id: I5c732c969a9a89af76b82e60ac652cf00bb878bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-06 17:05:42 +00:00
Konstantin Shcheglov 64fcb8de1b Prepare for removing deprecated methods from NamedType.
The actual removal will happen in (to be rebased on top of this):
https://dart-review.googlesource.com/c/sdk/+/303280

Fixing direct uses of the deprecated `Identifier get name` is apparently
only about a half of the work. I should have followed my own advice to
the clients and prepared better.

These changes are necessary because we will stop creating and
visiting `Identifier`, and so `NamedType` should be handled directly.

Change-Id: Ie07b75b15eab277ed6c9b29a838561a7eb71f588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303425
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 01:54:21 +00:00
Konstantin Shcheglov a3956e49d0 Use InvalidType instead of DynamicType when unresolved.
Bug: https://github.com/dart-lang/sdk/issues/36697
Change-Id: If982ca46030959160f21950c5b5e3127895d937b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300181
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-10 20:38:48 +00:00
Danny Tuppeny dd72682815 [analysis_server] Handle completion for conditional imports
Fixes https://github.com/Dart-Code/Dart-Code/issues/4530.

Change-Id: Iac1ec0467fa9d1838f75ff2512e1ca79f02fade8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302205
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-10 16:19:32 +00:00
Konstantin Shcheglov 036b8cafad Add AnalysisError.tmp() constructor, deprecate the default one.
Bug: https://github.com/dart-lang/sdk/issues/51985
Change-Id: I1204c71a4c5ea62d32d65662ecb5274dacb0bfae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301730
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 14:39:29 +00:00
Konstantin Shcheglov ec330b47de Deprecate 'DartType.isDynamic', use 'is DynamicType' instead.
Change-Id: Ia3660a0d38f01a590dd3e034f40dbdb5a432638a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300042
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-01 16:09:08 +00:00
Konstantin Shcheglov 4756d077ed Update NamedType to use ImportPrefixReference and name token.
Using Identifier expression inside NamedType does not make sense.

Change-Id: I4a61d2b472fd66fb7c5e6e92a80cccb391b06d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-28 17:31:46 +00:00
Konstantin Shcheglov e8622f2d63 Issue 52059. Don't suggest final/var in ObjectPattern in ForEachPartsWithPattern, suggest getters instead.
Bug: https://github.com/dart-lang/sdk/issues/52059
Change-Id: If5e1c40fa75735077b2b77a5941d16fe2c767f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-20 16:14:58 +00:00
Brian Wilkerson 2da2520bd6 Stop suggesting methods in object patterns
Fixes: 52058
Change-Id: I031fcd2b48975729cca48f640c3d86f5d2cfc0b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-20 00:52:20 +00:00
Konstantin Shcheglov 1d718fc7e9 Issue 52051. Fix a crash, add a branch for RecordLiteral in _argumentListContext()
Bug: https://github.com/dart-lang/sdk/issues/52051
Change-Id: I2c8c2271cc51fbe1c013c6ac324052c347dd379b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296361
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-19 22:07:59 +00:00
Konstantin Shcheglov dc34fe9f86 Deprecate IfElement/IfStatement.condition, use 'expression'.
Change-Id: If43b4b71a21fd256ce8d1367d4b233e1cff764b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296122
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-19 17:17:28 +00:00
Keerti Parthasarathy 90c434254f Add support for patterns for Add type quick fix
Bug: 51866
Change-Id: Id38d0c8405931cad057ec3db1e0c0e3d297d7b4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-04-14 20:09:52 +00:00
Konstantin Shcheglov b1c0f16a51 Issue 51961. Suggest getter names inside pattern of named PatternField without name, inside RecordPattern.
Bug: https://github.com/dart-lang/sdk/issues/51961
Change-Id: I33b499829887dc221c2d18fe4586ec08207c026f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293863
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-06 19:55:08 +00:00
Konstantin Shcheglov 7ba94c9202 Issue 51961. Suggest getter names inside pattern of named PatternField without name, inside ObjectPattern.
Bug: https://github.com/dart-lang/sdk/issues/51961
Change-Id: Ibd6f762f4e363f26daaca21515a9c23c748f8cc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-05 22:47:19 +00:00
Konstantin Shcheglov 2427527612 Suggest type names during completion in CaseClause and SwitchExpression body.
Change-Id: Iea7c2c3d0879191265c368b5e79fbf2cfaab0dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-05 20:48:24 +00:00
Samuel Rawlins 77446204da Reland "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
This reverts commit e48f35b43d.

Reason for revert: linter is fixed.

Original change's description:
> Revert "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
>
> This reverts commit 0ef7ed2ebd.
>
> Reason for revert: Tests are failing in google3 - linter needs to be bumped
>
> Original change's description:
> > [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
> >
> > Bug: https://github.com/dart-lang/sdk/issues/50796
> > Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
> > TEST=presubmit bots
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
> > Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> > Reviewed-by: Alexander Aprelev <aam@google.com>
> > Commit-Queue: Samuel Rawlins <srawlins@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/50796
> Change-Id: If1c460bdcf422033648417da5ba2f5fbc1b459c2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291460
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Oleh Prypin <oprypin@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>
> Commit-Queue: Oleh Prypin <oprypin@google.com>

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ie503b57a19df1a50cb3dfe50c840d20779310e87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-03-28 21:26:58 +00:00
Oleh Prypin e48f35b43d Revert "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
This reverts commit 0ef7ed2ebd.

Reason for revert: Tests are failing in google3 - linter needs to be bumped

Original change's description:
> [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
>
> Bug: https://github.com/dart-lang/sdk/issues/50796
> Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
> TEST=presubmit bots
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: If1c460bdcf422033648417da5ba2f5fbc1b459c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291460
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2023-03-28 07:16:42 +00:00
Sam Rawlins 0ef7ed2ebd [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
TEST=presubmit bots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-03-27 21:41:12 +00:00
Konstantin Shcheglov edccf64f54 Fix for highlighting mixin names.
Change-Id: Idadb02aa1b86525fde307a5eddc8876f152d1b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-24 21:37:57 +00:00