Commit Graph

9757 Commits

Author SHA1 Message Date
Chloe Stefantsova a004960960 [analyzer] Add occurrences tests for null-aware elements
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: Ic6e48f1579b60a59ddb17c08202232081cbd3bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-23 23:09:40 -08:00
Brian Wilkerson e8e56ff2f5 Cleanup declarations in server with trailing digits
There are still lots of declarations whose name ends in a trailing
digit, but most of them are unrelated to the migration, and some
are required in order to not break internal code.

I'm happy to break this up into smaller CLs if it's hard to review.
Mostly it's just renaming some declarations, although there are one or
two places where I did a little more clean-up.

Change-Id: I50d32316e82e48c6a5a47aec630b4ffee2ead2c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410922
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-02-23 08:17:36 -08:00
Konstantin Shcheglov fad65ac3b4 Elements. Migrate NamespaceBuilder.
Change-Id: I3f51d6ad88528a7a7251a8c140795a442b04e5a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-21 16:41:39 -08:00
pq 2227249c2b [PE] [linter] don’t report require_trailing_commas if language >=3.7
Fixes: https://github.com/dart-lang/sdk/issues/60119

Change-Id: If4821300dcae05cd1283558a87481d2bad7dae9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411182
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-21 14:09:47 -08:00
Chloe Stefantsova db96984d37 [analyzer] Add correction for removing '?' before elements
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: I36543863eb76724cb23b4521780eccd130750014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410042
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-02-21 11:28:29 -08:00
FMorschel bbb4a1b4e7 [DAS] Adds base tests for auto-complete on dart docs
R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/59724
Change-Id: Ia2345c77371a58ad0be402daa93642a3f0e53dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410461
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-02-21 07:57:09 -08:00
Chloe Stefantsova 57e5b2895f [analyzer] Handle NullAwareElements in Flutter outlines
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: I32557d994d16b97b8f3b40bb3d654a657338b83e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-20 23:32:01 -08:00
pq 7ac018eaf4 [element model] migrate error_verifier (import directives, cleanup)
Change-Id: Ie413c7ab0cb9e4fdcdf11cec6e726c376e0701af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411085
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-02-20 15:32:29 -08:00
Danny Tuppeny bc7feacec6 [analysis_server] Fix missing trailing comma when inserting arguments before solo child/children
The logic here was bad, assuming we didn't need a trailing comma when inserting an arg before a solo argument (which can happen for child/children).

Fixes https://github.com/flutter/devtools/issues/8921

Change-Id: I38f9003cdc8b499d6417cac7989c65a4760416a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-20 15:07:32 -08:00
Brian Wilkerson 0ebec968c9 [migration] rename.dart
This also migrates all of refactoring.dart except for one getter that's used internally.

Change-Id: If11f30d740c02509e3eeeac90268b14540e3e0a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-20 13:40:40 -08:00
Danny Tuppeny a31be9beba [analysis_server] Provide DocumentLinks for packages in Pubspec.yaml
Having quick links to pub.dev in pubspec.yaml is a long-standing request, but all of the API options to implemented it seemed bad.

However I was recently made aware that DocumentLinks (which we use for the Flutter example links) support HTTP links and this turns out to be a perfect fit (credit to https://github.com/orestesgaolin for the idea).

Links are built based on the kind of package, so `git` and `hosted` packages will be built accordingly (I special-cased GitHub SSH links but don't know if this could be generalised for other Git-hosting services). We use PUB_HOSTED_URL as the default base for standard Pub packages.

Packages that don't have URLs (such as `path`, `sdk: x` or other unknown kinds) will not produce links.

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

Change-Id: I1c9e704f67736bbc451866a9e10f7928e2246c7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409660
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-02-20 09:36:01 -08:00
Brian Wilkerson 2c62efb890 [migration] cider/rename.dart
This also contains some minor, but unrelated, changes to
kythe_visitors.dart. I'm happy to back them out if you'd like me to.

Change-Id: I89dac691c3bb1c642a343c010fb71b66680272c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410901
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-20 06:54:29 -08:00
FMorschel 8f79645456 [DAS] Fixes closure cases for inline method refactor
R=scheglov@google.com, pquitslund@google.com

Fixes: https://github.com/dart-lang/sdk/issues/60160
Change-Id: Ie6313a92d5e4326b81ad0f277c5a8ff2c264ca39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410603
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-02-19 10:24:07 -08:00
Keerti Parthasarathy dd93f6fae0 Fix for create constructor for Widget with private fields.
Fixes https://github.com/dart-lang/sdk/issues/56182

Change-Id: I25a94dbb5af5dda4db1fde9494783df215587fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-02-18 21:48:29 -08:00
Brian Wilkerson f0561dcdb9 [migration] refactoring_manager.dart and handler_rename.dart
Change-Id: I9294afbec0d472fb87c595d0e9c9b9ca2a2cc838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410444
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-02-18 17:17:12 -08:00
Konstantin Shcheglov 999f39e908 Elements. Remove FindElement fields where possible.
Change-Id: Iea32d103f433d88c70de837bba09435b6f52d11a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-18 14:29:23 -08:00
FMorschel 2048190cb1 [DAS] Makes encapsulate field work with final
R=scheglov@google.com

Fixes: https://github.com/dart-lang/sdk/issues/60154
Change-Id: I45c887169672e3cdbce4aea95000996c09e8123b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-02-18 14:02:43 -08:00
Paul Berry a0b38184e2 Remove OWNERS file for the analyzer team.
The code that was previously owned by the analyzer team
(OWNERS_ANALYZER) is now owned by either the Dart Model team
(OWNERS_MODEL) or the developer experience team
(OWNERS_DEVELOPER_EXPERIENCE). Accordingly, we don't need
OWNERS_ANALYZER anymore.

Change-Id: I9a4d2e2462a15ba9ec8f3046cdca77ba9d3af13c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410564
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-18 12:24:57 -08:00
Johnni Winther c714269f51 [analyzer] Migrate ElementDeclarationResult
Change-Id: Iaa18a32075e2dc92d47378d90cfb801bc5884473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408702
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-02-18 08:22:51 -08:00
Brian Wilkerson b7178c2b58 [migration] element_visitors.dart
Change-Id: I85b6e19575a1a8695982bf8349fc88c84ace2645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410241
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-14 21:28:52 -08:00
Brian Wilkerson 0c423637b6 [migration] namespace.dart
Change-Id: I87d287cd73e34b3797258e27e4b80e57942bd7c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410163
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-14 21:28:39 -08:00
Brian Wilkerson 02f86848ee [migration] etract_method.dart
Change-Id: I683d58f131fb610cd343e9446a2abf1466313b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410143
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-14 15:49:46 -08:00
Paul Berry d960dcd43c Add an OWNERS file for the Developer Experience team
Moving forward, the Developer Experience team will own the following
packages:
- analysis_server
- analysis_server_client
- analysis_server_plugin
- analyzer_plugin
- language_server_protocol
- linter
- meta
- server_plugin
- telemetry

In follow-up CLs I will create an OWNERS file for the Dart Model team,
and then remove the OWNERS files for the old analyzer and CFE teams.

Change-Id: Icc52ca75e92baf9d05de211e9e3f6c36fb19b71e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409860
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2025-02-14 15:29:40 -08:00
Konstantin Shcheglov 7964d55940 Elements. Migrate TopLevelDeclarations.
Change-Id: I9bdcf6ac8c26bfa2eb50de8efd8c2a3a3538403a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-14 14:46:37 -08:00
Brian Wilkerson c38b8bb007 [migration] abstract_rename.dart
Change-Id: I90dc69640a15a8cdf14dc7fa2fb486f30e547445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-14 14:38:29 -08:00
Brian Wilkerson d18af76865 [migration] analysis_server.dart
Change-Id: I111faf848d4243f72fb5e9bf20393784d6ed1fcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-14 12:15:10 -08:00
Brian Wilkerson 0c15648c0b [migration] search_find_element_references.dart
Change-Id: I320e4a92a8c5b5e6cb55347d93272c38a92cc325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410100
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-02-14 10:48:20 -08:00
Paul Berry d3de420bf8 Add a custom lint to sanity check the analyzer public API.
The new lint, called `analyzer_public_api`, verifies that the analyzer
public API satisfies the following properties:

- No method, function, getter, setter, or supertype in the public API
  refers to a non-public type.

- No `export` declaration in the public API shows a non-public name.

- No declaration in the public API has a name ending in `Impl`.

- No file in the public API has a `part` declaration that points to a
  file that's not in the public API. (If it did, then the other checks
  could be circumvented.)

A new annotation is added, `@AnalyzerPublicApi()`, allowing
declarations in `package:analyzer/src` or
`package:_fe_analyzer_shared/src` to be marked as part of the analyzer
public API. This is necessary because some parts of the analyzer
public API need to be declared elsewhere and then exported by the
analyzer.

A few lint violations have been ignored using `ignore:` comments. I
will try to clean these up in follow-up CLs.

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

Bug: https://github.com/dart-lang/sdk/issues/60058
Change-Id: I0047a73dec8a29e2ffe03dd3a90f7e41ca2e27b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-14 05:24:22 -08:00
Brian Wilkerson 56f82965d0 [migrate] protocol_server.dart
Change-Id: I5dcaaa2ae57d17eafb6359eccf9ea2a35df21784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-13 17:33:00 -08:00
Sam Rawlins 03eb25d975 Bump analyzer version used in plugins
Change-Id: I409bab47add37b51e676fc39286244aae554a4fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-13 12:25:00 -08:00
Danny Tuppeny b0566a5773 [analysis_server] Remove isDefault and don't set value when there's no argument for EditableArguments API
Now that we have `defaultValue` against each argument, there was some redundancy here.

`isDefault` is redundant because if `hasArgument=false` it's always default, and if `hasArgument=true`, then `value` and `defaultValue` can be compared
When `hasArgument=false`, there's no value in duplicating `defaultValue` into `value`

Change-Id: I5cba055e56175565842efef815e08dd46e9ed36a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406621
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-13 09:23:32 -08:00
Brian Wilkerson ffe97e5fdc [migrate] Partial kythe_visitors.dart
Change-Id: I571ba21c663a577a34daa02a50d232f05ba1857c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409565
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
2025-02-13 08:11:15 -08:00
Brian Wilkerson 0e9c9f0868 Some minor cleanup in the analysis server
Change-Id: Iebfa1f3fc421676ab053df6e7635b912dfe9ebbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-12 15:04:39 -08:00
Ben Konyi b732a62fd2 [ analyzer ] Add support for "Wrap FutureBuilder" code assist
Fixes https://github.com/dart-lang/sdk/issues/34364

Change-Id: I53b005fdae61fe84ebc7defd54531df6dcd2a351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408341
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-12 13:12:19 -08:00
FMorschel 1a0b1fe496 [DAS] Fixes renaming closure parameter
R=scheglov@google.com

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

Change-Id: I24b62213c6ef81e76603e7bffabe463c9ca96dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408140
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-02-12 12:48:28 -08:00
Danny Tuppeny ff93acd624 [analysis_server] Fix "Move to File" for top-level variables with references to their getters
There were two issues here:

1. Analyzer's `prefixesUsedInLibrary` search did not handle when an element was not found in the library (for example when looking for a top level variable that doesn't match because it's referenced through a getter)
2. The refactor not looking for prefixes for getters/setters when updating other files

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

Change-Id: Ic560e06c45091937611b247e7fee26b9854873fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-12 11:41:34 -08:00
pq 8a21984c8c [productivity] add explicit program args to launch configs
Bug: https://github.com/dart-lang/sdk/issues/60070
Change-Id: Ibd0854e727855bf77ff789af546f85c04628a076
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-02-12 10:33:21 -08:00
Konstantin Shcheglov 0c412862d8 Elements. Migrate RenameImportRefactoringImpl.
Change-Id: I0e295b36fdc6c9e47c3cf5b0e648891d12fad031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-11 08:59:50 -08:00
Danny Tuppeny e758dffdbb [analysis_server] Add missing bool completions for strict language options in analysis_options
Fixes part of https://github.com/dart-lang/sdk/issues/59827, but not the main issue.

Change-Id: I7f9d6cfd5163a1bf6c72f9eea4bb71872d3dfa15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-02-11 08:27:51 -08:00
FMorschel 2eec09dcd4 [DAS] Makes EXTENSION_DECLARES_INSTANCE_FIELD trigger on all field names
R=jensj@google.com, paulberry@google.com

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

Change-Id: Ic4b41973d0d74d809d813ba57b85f50fab4c9a47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407080
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-02-11 03:15:31 -08:00
FMorschel 3f71a43464 [DAS] Adds new fix for importing multiple names in combinantors
R=srawlins@google.com

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

Change-Id: I3f48517b927aeaa3c410b6f04fcf75b3beead923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399021
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-02-10 23:51:30 -08:00
pq 4d1b785239 [productivity] add “current file” launch configs
Bug: https://github.com/dart-lang/sdk/issues/60070
Change-Id: I003a492e6004d2dcaf6c2c52688c733d7f43e53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408900
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-10 14:31:52 -08:00
Jake Macdonald e6df5493c9 support renamed parameters when adding super calls
Bug: https://github.com/dart-lang/sdk/issues/59745
Change-Id: I177e4f748954ddfea1b300085800c8c9a87bed3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408840
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-10 12:48:10 -08:00
Danny Tuppeny 3ded147e2e [analysis_server] Make format of LSP completion tests more consistent
No functional changes here, only formatting/code style:

- Remove additional intending from embedded code in some tests (which didn't match others in this file or the style of other tests in the server)
- Change expression-bodied-tests to block bodies where they're not on a single line

Change-Id: I2c15bbcf7b7accff85f34a4e9ad5afa3e0a0a221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-02-10 10:27:40 -08:00
Keerti Parthasarathy 0246cc613f [Completion] Show enum constants when completion is in the declaration.
Fixes https://github.com/dart-lang/sdk/issues/56971

Change-Id: Ib33a58e774f5540c426f5d5ffb7a387414dcf9f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-02-09 22:41:31 -08:00
Sam Rawlins 093ab49d6f DAS: Correct several broken comment references
Change-Id: Id0e80d5566a5c05296a5941746888a48284c4ae0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407861
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-09 08:40:07 -08:00
Sam Rawlins 03c0855f9d DAS: Tidy snippet_producer.dart
While fixing the doc comments for DartSnippetProducer.addImports, I
saw that it references two methods only found in the subclass,
FlutterSnippetProducer ("Adds public imports for any elements fetched
by [getClass] and [getMixin]").

It turns out that the `addImports` method and the `requiredElementImports` are only needed in the subclass,
FlutterSnippetProducer, so I just moved them over. Now the doc
comment references resolve correctly.


Change-Id: Id90e8257b4096308b8cd3ce19b14708ca1b5e365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-09 08:30:03 -08:00
Jake Macdonald da2ffedc50 add test for adding super calls with multiple parameters
Bug:https://github.com/dart-lang/sdk/issues/59745
Change-Id: Ibaf6321f0ea6cf3046f360e91cf58faba7a16cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408460
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2025-02-07 13:30:01 -08:00
pq c87b18581a [CQ] rationalize/unify test lint registration
Eliminates duplication and promotes hermetic tests (some were registering and failing to unregister test lints).

Bug: https://github.com/dart-lang/sdk/issues/60036
Change-Id: I9d0fe5fd610b51ce9000decbf75da2338ed87737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-02-07 13:09:28 -08:00
Danny Tuppeny a78fb5e47a [analysis_server] Fix semantic tokens for method tear-offs in object patterns
Fixes https://github.com/dart-lang/sdk/issues/59976

Change-Id: I75127a59670522ddfc6526d10bfe9844638fdd99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408001
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-07 12:24:25 -08:00