Sam Rawlins
f2d416b866
analyzer: simplify PackageConfigFileBuilder.toContent
...
This API did not exist (was not public) in analyzer 7.4.x, so is safe
to change in 8.0.0.
Change-Id: Ib4a06008b1cdf1be4f33dcb9036ea87b6d258067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430041
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-22 10:58:49 -07:00
Sam Rawlins
b40b806bee
DAS: enforce unnecessary_async lint rule
...
Change-Id: I05c6fbcc5ea7dea37bb7a01a3492e5cd842d11ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428923
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-16 13:37:53 -07:00
Sam Rawlins
c4c9854b9b
analyzer_testing: Move ResourceProviderMixin to analyzer_testing
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I31932409e495369793dd16c017385c98b86cf44c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427480
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-09 16:56:29 -07:00
Sam Rawlins
3021cc4913
analyzer: Move PackageConfigFileBuilder to public API.
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I3df2cd374f6b3ef9e027f0e07c748be6ea21ebb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427586
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-09 10:57:55 -07:00
Sam Rawlins
2f706c4290
analyzer_testing: move experiments library to analyzer_testing
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I9c5aa920e9f96f99ea00d6993b5f4dafd415f831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426986
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-07 13:12:13 -07:00
Brian Wilkerson
5d6dc673dc
Make nodeCovering a method on CompilationUnitImpl rather than an extension method
...
This allows us to traverse the children without needing to create lists.
It also allows us to iterate over lists of nodes more efficiently.
Tested against the script that computes fixes for 10,000 diagnostics,
I'm seeing the following result.
Before this CL the average time was 10692.4 ms.
After this CL the average time was 1900.0 ms.
That's just over an 82% improvement.
Change-Id: Ideff745288c8990e9948b22c5204d176af3cac6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426904
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-05-07 09:05:52 -07:00
Sam Rawlins
7431e885e8
analyzer_testing: Move in the mock packages.
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: Ic789b8347d3bfc71a02af423fbb1a8c58da7b32d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424921
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-05-06 11:32:22 -07:00
Sam Rawlins
126def2b08
analyzer_plugin: Use Diagnostic instead of deprecated AnalysisError
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: Icf62987d6de7cafb6f6e92076a5fcc2bd48772c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426522
Auto-Submit: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-05-05 11:34:00 -07:00
Konstantin Shcheglov
b2fdd8a345
Elements. Rename XyzElement2 into XyzElement.
...
The CL was done with rename + adding typedef for each class.
Change-Id: Ia25cc581d2e42cf7d12a85a3579af952d5c232ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 13:27:18 -07:00
Konstantin Shcheglov
49599e06cc
Elements. Deprecated element2.dart library.
...
Change-Id: I2be38df49e6f242d9fe59f34164549da4a0f41b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424683
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 11:23:18 -07:00
Sam Rawlins
52f965e217
Analyzer: Remove outdated NodeLocator class
...
Change-Id: If8cff437d35452af5a19b4d414352228f899a94f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423216
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-21 10:11:30 -07: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
Konstantin Shcheglov
8121b02725
Elements. Migrate test/support/abstract_context.dart
...
Change-Id: I75004a7f979315b838d2699a0dcdd8df13b2864d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403702
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-01-08 14:12:57 -08:00
Konstantin Shcheglov
810eeb4465
Elements. Migrate lib/src/dart/ast/element_locator.dart
...
Change-Id: I7b57a239cd21737292224d05b38b86a0dbd4643c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-01-08 13:21:29 -08:00
Konstantin Shcheglov
e9d03a04d6
Elements. Update FindElement2 to work with elements, not fragments.
...
Related to: https://dart-review.googlesource.com/c/sdk/+/390812
No more `Fragment.name2` uses in `FindElement2`.
Change-Id: Idb5e766f4ced1b63bb2154d6fb1bdf5582011d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390633
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-10-21 19:44:53 +00:00
Brian Wilkerson
2c960d5d4f
Add access to FindElement2 in the test framework
...
Change-Id: I8a0def9df469a8e629e67e5c8cbd343bd076f74e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390925
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-10-18 20:00:40 +00:00
pq
238f116757
enable experiments in abstract context tests
...
Follow-up from https://dart-review.googlesource.com/c/sdk/+/378566
Change-Id: I0208e875bef02291fc3b5bf91472093633a271fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2024-08-02 21:26:35 +00:00
Brian Wilkerson
80b0bda3de
Convert the analyzer package to use the new location for mock packages
...
Change-Id: I097059764e999683564992b475fece4ebfb5a47b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372380
Reviewed-by: Sam Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-06-24 17:53:45 +00:00
Konstantin Shcheglov
9f6db2b92d
CQ. Stop using File.createSource() in analyzer_plugin/.
...
This mixes layers, which I believe one of the ways that cause large
library cycles.
Change-Id: Ic21292f2d831229a3ba444abf3131c66ec9968d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-05-31 16:14:31 +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
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
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
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
Sam Rawlins
6333e318cd
[analyzer] Move 2 more Hints to be Warnings, DEAD_CODE*
...
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ie7a6cb94cefaf4f551ed766e637bac3606c0f5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279463
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-03-21 21:55:08 +00:00
Sam Rawlins
f6d41b95fb
[analyzer] Move 2 more Hints to be Warnings, UNUSED_CATCH_*
...
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Id8b53ebef2b44d6fe1a436edf796056f60913024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279443
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2023-01-25 16:04:09 +00:00
Danny Tuppeny
604bf2fe3b
[analysis_server] Don't overlap folding regions when lineFoldingOnly
...
+ convert LSP folding tests to use TestCode parser.
A change in VS Code means two folding regions are no longer allowed to end/start on the same line (the second range is silently dropped). This truncates folding regions if they end on the same line that another starts to end on the line before (but only if a client only supports line-folding mode).
Fixes https://github.com/Dart-Code/Dart-Code/issues/4121 .
Change-Id: Ic26f58f84c44a01ae5157c336ed0f207d1c0eeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-09-29 16:34:07 +00:00
Ahmed Ashour
e09493b7bc
[analyzer] use preferred quote-style when generating imports
...
Bug #49559
Change-Id: Ib77ea67bb1ea15bfabb1c717cfb5abf13fd6d3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-09-21 17:12:46 +00:00
Konstantin Shcheglov
20b560226e
Rename newFile2() to newFile().
...
Change-Id: I1c2a4f15dee607a0a6241dfaf2d764a7d284389b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-04-19 02:59:57 +00:00
Konstantin Shcheglov
41b3e0abcc
Make 'content' required in ResourceProviderMixin.newFile()
...
Change-Id: Id697b0736b95a913c31247a66425027852f1ddc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-03-14 17:31:48 +00:00
Konstantin Shcheglov
1693908268
Apply file changes between (not during) other operations.
...
This would be a breaking change, so for now it is disabled, but
the method `applyPendingFileChanges()` can be added, and the clients
will call it to be ready for the switching the flag.
Only clients that call methods like `changeFile` have to await applying
the file changes. Other clients can continue using synchronous
`currentSession`.
Change-Id: I0f8d4cc874f485776f611790f6c80fd7e07c8051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-03-09 18:16:45 +00:00
Konstantin Shcheglov
27dbfdd6b4
Revert "Copy 'meta' and 'js' packages from pkg/, instead of partial duplicates."
...
This reverts commit 7395ec9a6a .
Reason for revert: Breaks analyzer tests in google3, breaks linter tests.
Original change's description:
> Copy 'meta' and 'js' packages from pkg/, instead of partial duplicates.
>
> It does not seem to affect timings of running tests, at least locally.
>
> Change-Id: Icc7c86b5fa6deaf18032e701d685911b50e7591e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234683
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Samuel Rawlins <srawlins@google.com >
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com ,srawlins@google.com
Change-Id: Ib47fbbc9ff743f5a4ea35504d268ee92c8072ac8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234703
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-03-01 05:13:47 +00:00
Konstantin Shcheglov
7395ec9a6a
Copy 'meta' and 'js' packages from pkg/, instead of partial duplicates.
...
It does not seem to affect timings of running tests, at least locally.
Change-Id: Icc7c86b5fa6deaf18032e701d685911b50e7591e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-03-01 01:33:17 +00:00
Konstantin Shcheglov
7f07c9d3ff
Replace Predicate with Function, remove java_engine.dart
...
Change-Id: If3ac722f855106c2350c3217c8e7d7ba69dfbaed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-12-12 03:32:31 +00:00
Konstantin Shcheglov
3cd8dfe95b
Deprecate MockSdk, switch to createMockSdk().
...
Change-Id: I512cd93af2f4aeab91f3d739c58c47572f3c4ede
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217151
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-10-19 18:52:15 +00:00
Konstantin Shcheglov
7262decaea
Remove WithNonFunctionTypeAliasesMixin and WithNullSafetyMixin from analyzer_plugin tests.
...
So, consistently with analyzer/, by default enable everything, and
disable with WithoutNullSafetyMixin as necessary.
Change-Id: I89079d3c1122a14ad338aa8f0d8008086a1fcb89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213295
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-14 16:57:45 +00:00
Konstantin Shcheglov
79327c9f05
Make ResolvedUnitResult.content/unit non-nullable.
...
Change-Id: Ia79567d248f2c91290bfdf8204ea7e9f3dc85fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206668
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-07-14 02:33:10 +00:00
Konstantin Shcheglov
cac96f7f8d
Rename AnalysisSession.getXyz2() into getXyz().
...
Change-Id: Ia76aafc6a1190dcdca026097c364270389f2860a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-07-12 22:42:58 +00:00
Konstantin Shcheglov
26d9fbbd04
Add getResolvedUnit2(), deprecate getResolvedUnit().
...
Change-Id: I0217fefb2747f2f9bd757bc041b53acaf3d1a8f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-16 21:33:54 +00:00
Konstantin Shcheglov
114d7b980a
Migrate analyzer_plugin package to null safety
...
Bug: https://github.com/dart-lang/sdk/issues/45236
Change-Id: I01175a2b2b1eb3ce6cdf30ade794d8186c6e8ead
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-30 00:29:37 +00:00
Konstantin Shcheglov
53c8eda967
Keep more specific types for AnalysisContextCollectionImpl to avoid downcasts.
...
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.
Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-06 06:23:25 +00:00
Konstantin Shcheglov
9f986d2501
Migrate package:analyzer to null safety.
...
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2021-02-01 18:56:04 +00:00
Konstantin Shcheglov
4a5ac9df57
Support for non-function type aliases in convertElement() and test navigation.
...
Change-Id: Ic2dcf6ad3faaf6712fdcbbe5197f332b6ba42e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-26 06:40:00 +00:00
Konstantin Shcheglov
b1196f7389
Use resolveTestCode() and resolveTestFile() in analyzer_plugin as in analysis_server.
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: I8d2a1dcc98bd58d00d4fed842174df4e9ca9f1d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-15 17:15:33 +00:00
Konstantin Shcheglov
d2f2f734bf
Replace findElementsByName() with FindElement.
...
Change-Id: Ia7b9d6785eb0d727c2bebee2b94fc6258b50d71c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-15 01:10:24 +00:00
Konstantin Shcheglov
f950d94762
Simplify addSource() in analyzer_plugin/ tests.
...
Change-Id: Ib3810608ceaace11a3befcb2b6ceb6f7a527a9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 05:12:47 +00:00
Konstantin Shcheglov
25b80442d4
Enforce that only Dart files can be changed after analysis in AbstractContextTest in analyzer_plugin/.
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: I2aefc2f4d2035d9e37ca36bf0c8ffc965a00aad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174225
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 05:04:41 +00:00
Konstantin Shcheglov
6e311941bb
Clean up WithNullSafetyMixin in analyzer/ and analyzer_plugin/.
...
Bug: https://github.com/dart-lang/sdk/issues/43837
Change-Id: I2282d0230e5ea0abdd2a08de2a16cfaa602c3cc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 04:56:46 +00:00
Sam Rawlins
38e3414748
analyzer_plugin: Prepare tests for Null safety flag flip.
...
Only one test suite featured tests which needed to be in Null safety, so
that was split into two suites. Otherwise, the changes very nearly mirror
those in https://dart-review.googlesource.com/c/sdk/+/169141 .
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: I39219dc0157ac33d4be1d902930060577e659cad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169244
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-10-28 04:26:17 +00:00