Commit Graph

8026 Commits

Author SHA1 Message Date
Danny Tuppeny f1e3bfcef5 [analysis_server] Check for bulk-fixable errors to skip resolution during bulk fix operations
Change-Id: I21a9fa4ed71839e7e196240c0bda31403cfea96c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 21:56:01 +00:00
Konstantin Shcheglov 26801b7d7e More clean up in AbstractContextTest.
Change-Id: Id1f3bd7dbd22c6bc8ae63fd04ee0c7231af69e02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 20:34:17 +00:00
Konstantin Shcheglov 1a98453d63 Issue 48474. Fix for renaming private methods, don't update other libraries.
Bug: https://github.com/dart-lang/sdk/issues/48474
Change-Id: I361c5d53826a2e8b97c5c5df9e14a0298b6fe424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308165
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 20:27:08 +00:00
Konstantin Shcheglov 6055524426 Use File instead of String path in AbstractContextTest.
Change-Id: I30ea3f08f8954e4d642aaf070e0da313013ad153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 19:21:31 +00:00
Danny Tuppeny fde2b15e35 [analysis_server] [dart fix] Use existing server ByteStore to speed up checking for errors
On my Windows PC using the Flutter repo (running `dartdev fix` from source) I see significant improvements:

flutter/packages/flutter/: 45s -> 15s
flutter/: 5m 23s -> 33s

These projects are clean so have no fixable errors, the improvements may be smaller where there are fixable errors and a larger proportion of time is spent resolving libraries.

Change-Id: Ie48baaa4ff8916112dab6639ae4e824e5b646ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 19:18:32 +00:00
Ludi Zhan 4079a47cc4 [analyzer] Introduce a new annotation @visibleOutsideTemplate
The new annotation is intended to be used on members of class, enum or mixin to opt out the @visibleForTemplate visibility restriction cascaded from class- / enum- / mixin- level.

1. Throw warning if the annotation is added to a invalid target.
2. Update @visibleForTemplate diagnostics logic to opt out members annotated with @visibleOutsideTemplate.

Change-Id: Iec546fc7785cd45f39a1b2a2cc8849ef1cf9d04a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304825
Reviewed-by: Marya Belanger <mbelanger@google.com>
Auto-Submit: Ludi Zhan <ludizhan@google.com>
Commit-Queue: Ludi Zhan <ludizhan@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-08 18:47:15 +00:00
Brian Wilkerson f197c63616 Convert argument list contributor tests
Change-Id: I998bc7a23e83541b10c38596f66a7496fb3d9682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307974
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 16:33:47 +00:00
Konstantin Shcheglov 25dc2147bb Separate testFile and testFilePath in server tests.
Change-Id: Icc11f0c7f1642471cc01a0046e2a04801efba084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307967
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-07 23:56:09 +00:00
Danny Tuppeny fb0b139358 [analysis_server] Improve performance of checking and running "dart fix"
Running the check for whether to prompt about "dart fix" in the LSP server with the whole Flutter repo open took around 45s before, and around 0.45s after. Almost all time was spent resolving libraries but now resolution is skipped for any libraries that don't contain fixable errors.

In my testing, "dart fix" (from source) didn't see any significant gains (around 46s down to around 43s for flutter/packages/flutter in my testing).

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

Change-Id: I0db63f5d54c7c262fe16aeb825f817cf526199c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-07 22:03:36 +00:00
Konstantin Shcheglov 692ef6be03 Add quotedAndCommaSeparatedWithOr and use for TransformSetParser.
Change-Id: Ie599d1e7b24efa137cb342392d278df051fbed33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307666
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-07 17:19:59 +00:00
Konstantin Shcheglov bdd145a39a Issue 52601. Extend 'Create constructor for final fields' to support enums.
Bug: https://github.com/dart-lang/sdk/issues/52601
Change-Id: I3e8dcc288864ca7c68992cb1218e66b2d34c5aa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307669
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-07 02:11:27 +00:00
Danny Tuppeny 3beb26c531 [analysis_server] Support iterative "fix all" through LSP
Fixes https://github.com/dart-lang/sdk/issues/47968.

Change-Id: I7e96199c971d98ef46715c87e7c0dbe6ffae49ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-07 00:32:00 +00:00
Konstantin Shcheglov 79b71c789f Use ParameterReference for ChangeParameterType.
Change-Id: Iad7f840d7342b4868529aea1e3767a79739dd18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307662
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-06 19:34:20 +00:00
Konstantin Shcheglov 7071c65b8c Change TransformSetParser.singleKey() to avoid null asserts.
Change-Id: Idd01da5d024f661ef7ec1102d1f1adb1fdca3f41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307581
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-06 17:39:36 +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 526ce3aba4 Issue 52005. Convert non-exhaustive returning SwitchStatement to SwitchExpression when followed by throw.
Bug: https://github.com/dart-lang/sdk/issues/52005
Change-Id: I16bf21703e4404e805dbc40906be5936e95f102c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307510
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-05 22:44:53 +00:00
Konstantin Shcheglov 8d29829271 Use 'coveringNode' name in RefactoringContext, as it is in Selection.
Change-Id: I376463a748e1349f2c07c3547754c551134b085e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-05 20:49:58 +00:00
Brian Wilkerson 97ec9e95bf Convert imported reference completion tests
Change-Id: I288121d53e13ab998dfa1681754fc5a422e50766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-05 20:49:48 +00:00
Danny Tuppeny 29f121126b [analysis_server] Allow skipping slow benchmarks with env variable
These tests can be quite slow (around 90 seconds on my machine, out of 4-5 mins for a test run) but aren't actually testing a lot. Opting out of them when running all tests repeatedly makes things much faster.

The default is still for them to run, you need to explicitly opt-out to skip them.

Change-Id: Id1aff44f48e71059f6ca44ff17acbf3f86427d61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-05 16:01:35 +00:00
Danny Tuppeny c739cbfd7b [analysis_server] Fix generation tests on Windows
The check normalises newlines from "actualContents", but "expectedContents" could also contain \r\n on Windows (at least it does for me), so this just normalises both.

The additional await/async is to prevent "Test failed after it already completed" warnings because this code is inside the call to test() (and not wrapping it, like the other .main() calls in the file).

Change-Id: Iac034efaf1a8a6dad4a21dc67a2dfdb74092dd22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-04 19:18:51 +00:00
Danny Tuppeny f984411eac [analysis_server] Fix split_multiple_declarations to use \r\n on Windows
Change-Id: Ifd94cd7aa425eae78c6d1eb0a814b6b868f68905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-04 19:18:08 +00:00
Danny Tuppeny 2a705d8612 [analysis_server] Extract base server functionality from protocol-specific callbacks
This is just a refactor with no functional changes.

To simplify future work of supporting both protocols against a single server, this removes some common functionality out of each server into the base server (or in this case, some base callbacks that operate on the base server).

It's important when the server runs with both protocols that we don't accidentally duplicate any work, so stripping down the servers (and callbacks) to only the protocol-specific parts should make this easier.

Change-Id: I040368078b992d0c41bd8de10b09e38d3957f004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-03 18:33:15 +00:00
Parker Lougheed 25c0ae1c42 Link to dart.dev for linter rules
This allows more flexibility as we can configure the redirect overtime, compared to the GitHub hosted site which we have less control over. It could even redirect to the old linter site in the meantime if desired.

Contributes to https://github.com/dart-lang/linter/issues/4411 and https://github.com/dart-lang/site-www/issues/4498

Change-Id: I3512002cdf7f62c0338d67cec0d7091f1166479d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307000
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-02 18:26:13 +00:00
Konstantin Shcheglov 79e6783637 Typing tweaks for ExecuteCommandHandler.
Change-Id: I8d53e93eb619d9fcdb6bd884ef8eee421ae86af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306905
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-01 22:03:58 +00:00
Danny Tuppeny 247ca91bb8 [analysis_server] Tweak "ignore diagnostic" text for file
This makes the text more different (and longer) than the "ignore for line" so at a glance it doesn't look like the items are duplicated (see https://github.com/dart-lang/sdk/issues/51959#issuecomment-1571536150).

Change-Id: Ib752c9a222bf82b1af80ab7060a26208b0bc9201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-01 20:08:51 +00:00
Konstantin Shcheglov 255cf5a36e Issue 51995. Enable RenameToCamelCase for local variables when LintNames.constant_identifier_names is reported.
Bug: https://github.com/dart-lang/sdk/issues/51995
Change-Id: Ib72d75ce27cb8d1f49f7a8ac88af6a57d1ca8874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306670
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-31 20:51:19 +00:00
Konstantin Shcheglov dfb7e5098b Issue 52543. Support for 'remove comparison' fix for IfElement.
Bug: https://github.com/dart-lang/sdk/issues/52543
Change-Id: Ibeecc42db2135d507ed8f74f5a4888fb122b131f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306312
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-30 21:34:36 +00:00
Polina Cherkasova 41d77c0135 Remove signs '=' from autosnapshotting arg.
Signs '=' make initial parsing in analysis server failing.

Change-Id: I2187efa1d45bbfaddaf6248ade3f87775030141f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2023-05-30 16:33:43 +00:00
Konstantin Shcheglov 8702f09502 Issue 49759. Keep only 2.19 tests in RemoveDuplicateCaseTest.
The corresponding lint is no-op in 3.0
https://github.com/dart-lang/linter/issues/3674

Bug: https://github.com/dart-lang/sdk/issues/49759
Change-Id: I24fd82240d8e94e763742c546ec2d4cf3c4df8cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-26 20:42:21 +00:00
Konstantin Shcheglov faa16fc565 Issue 52130. Fix 'Inline Local' refactoring inside SwitchPatternCase.
Bug: https://github.com/dart-lang/sdk/issues/52130
Change-Id: Ic84e4781e12dece3775fc0462b727a6a9b9c9906
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306125
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-26 19:38:48 +00:00
Konstantin Shcheglov 9fadf93ee3 When running LspServerClient, without '--no_dds', extract the DevTools line.
So that we don't attempt to process it as part of LSP.

Change-Id: I29a297e40f038ea48ef25a0af86c73a165fc17dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-26 18:00:31 +00:00
Danny Tuppeny 9745fbe70d [analysis_server] Log when fixes and assists are used
Change-Id: I989e55aa8501c9b768ee72ad76c9266e8b0d0253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305860
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-26 15:10:31 +00:00
Konstantin Shcheglov 7d138719ec Use OwnedFiles to track which files are owned by which driver.
So, we don't have to recompute it at every symbol search.
For Flutter repository, searching for 'ButtonStyle' is 40% faster.

SHA: 47fe150674
Description: before
  [mean: 56.4][stdDev: 1.471][min: 54.0][max: 61.0]

Description: own files
  [mean: 35.0][stdDev: 1.308][min: 33.0][max: 38.0]
Change-Id: Id497bf4117bdfafeeccd04601fd0198e22624c0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305843
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-26 00:42:12 +00:00
Brian Wilkerson c1243af736 Keep the completion tests sane by de-duping results
Change-Id: Ia3d179fff02b5418ef0a46c06469d2509fbc45bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-25 19:16:16 +00:00
Simone Stasi aafc857ede quick fix for avoid_multiple_declarations_per_line
This CL adds a quick fix for `avoid_multiple_declarations_per_line`. This fix work for var/const/final/late variables, both typed and untyped. The declarations are also correctly indented and comments between the declarations are kept.

Change-Id: Ic614e264a199405cc0b9ceaea55a27c848970cfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-25 17:54:59 +00:00
Danny Tuppeny 3054053e79 [analysis_server] Don't remove unused imports in "Fix All" if being run automatically on-save
Before this change, using fix-all-on-save in VS Code would also remove unused imports:

```
"editor.codeActionsOnSave": {
	"source.fixAll": true
}
```

This behaviour was a little inconsistent without iterative fix-all (it would not remove the imports if other fixes were applied). Iterative fix-all made it consistent, but this behaviour is not what many users want (for example if they'd temporarily commented out code).

With this change, imports will not be touched when using fix-all if it was invoked automatically by save. However, it's possible to retain the original behaviour by invoked listing the original fix, or (more efficiently) `source.organizeImports`) to run on-save:

```
"editor.codeActionsOnSave": {
	"source.fixAll": true,
	"source.organizeImports": true
}
```

Fixes https://github.com/dart-lang/sdk/issues/52046
Fixes https://github.com/Dart-Code/Dart-Code/issues/4561

Change-Id: If68a5d13c2c1c9a494be61872c942fca8a4dd35c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-25 17:24:09 +00:00
Brian Wilkerson 07fb9dff39 Convert most of the local reference completion tests
I'm not sure how to convert the doc tests. They're currently depending
on being able to set up some state in the server that I can't reach
from the new test framework. I'm guessing that I might be able to define
dartdoc comments that would populate the data structures in the same way,
but if you can think of an easier approach I'd love to hear about it.

Change-Id: I20afcf0865c1a45b682444f8bce8c4e3c7fdc45c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305782
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-25 17:08:10 +00:00
Jens Johansen fa20ed6ea3 [analyzer] Remove context name from report
In response to https://dartbug.com/48788#issuecomment-1561371880

Change-Id: I5454d71beab1b3be2c8c0724fea23f4aa98b2573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305662
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-05-25 09:51:51 +00:00
Sam Rawlins 47fe150674 Bump linter to 27b46ce246204a2c0170a4bd5b23b94095e89a22
Change-Id: I15748475e9d96273c21be833e71924da111073ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305063
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-05-24 23:18:40 +00:00
Konstantin Shcheglov 4b281f2c0c Fix Windows bots.
After https://dart-review.googlesource.com/c/sdk/+/305143

Change-Id: I91ce7c5f5fabad3625588ea5aa8bc4d5b2a675d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-24 20:19:16 +00:00
pq 6177071590 prefer_final_in_for_each fix support for DartPatterns
(This is assuming https://github.com/dart-lang/linter/pull/4383 doesn't get reverted.)

Change-Id: I8c8fd8b0443170901bee7168f805a6dcf0ac1971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-24 19:58:53 +00:00
Konstantin Shcheglov 89cb058276 Update import analyzer to prepare for NamedType refactoring.
To land before https://dart-review.googlesource.com/c/sdk/+/303280

Change-Id: I7f1a2442cca1081c083472da8ee22f1f10b028bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-24 19:34:58 +00:00
Konstantin Shcheglov 4d6c762b70 Add 'Convert to constant pattern' quick fix.
Bug: https://github.com/dart-lang/linter/issues/4195
Change-Id: I76eeaaa8d8c9508c10a81d1eecd0bc46c8c7d1f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-24 19:31:21 +00:00
Konstantin Shcheglov c09793ad87 Issue 50534. Quick fix for use_string_in_part_of_directives.
Bug: https://github.com/dart-lang/sdk/issues/50534
Change-Id: I3ddc32646a473f1c5f322a0ecaaa850f3c2e3089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305143
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-24 17:14:37 +00:00
Konstantin Shcheglov 85f8fe8fd3 Issue 52137. Extend 'Remove unused local variable' to variables in list/map patterns.
Bug: https://github.com/dart-lang/sdk/issues/52137
Change-Id: I0602ab2f4a1c1a87e6e02a2e93d87d8e74ba4c44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-24 16:15:15 +00:00
Konstantin Shcheglov 71304ce543 Issue 52128. Support 'const UndefinedName()' in 'Create Class' quick fix.
Bug: https://github.com/dart-lang/sdk/issues/52128
Change-Id: Iea00b06b1635c6fbf1c0f4308bc7abcec61cf8bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305120
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-23 21:18:13 +00:00
Konstantin Shcheglov d856c6a460 Move FuzzyMatcher to analyzer.
In a future CL I'd like to filter out whole libraries depending
on whether they could have a match. At this point the search, filtering,
and matching become entangled too much to bind them with outside
code in the server. Instead, it all will be the analyzer's concern.

Change-Id: Iefdadbf92046218b3a2607fbeadd37494522112e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-22 23:10:07 +00:00
Konstantin Shcheglov 4bd2d5b58c Issue 52473. Fix NPE in SortUnnamedConstructorFirst.
Bug: https://github.com/dart-lang/sdk/issues/52473
Change-Id: I492b2c7fc896db615ec316d6e335795363db2110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-22 20:50:41 +00:00
Konstantin Shcheglov 7086cf687a Issue 52470. Fix RangeError in AddKeyToConstructors.
Bug: https://github.com/dart-lang/sdk/issues/52470
Change-Id: I0ab2630ac74cff42cb0f6e526a2f518c8e4cd918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304768
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-22 20:15:33 +00:00
Polina Cherkasova c192336dde Add auto-snapshotting and usage reporting.
Change-Id: I84b48cc750638ab3bcc138f2a0425442559e6d54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304212
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-22 18:00:26 +00:00