Konstantin Shcheglov
5dd02f0583
Add getParsedLibrary2(), deprecate getParsedLibrary() and other parse related
...
Change-Id: I585fa1f01b71522dc99ba86c2b9e20da256b2d27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-19 15:52:39 +00:00
Konstantin Shcheglov
60a53afc5e
Revert "Make AnalysisResult.path non-nullable, more non-nullable for ParsedLibraryResult and ResolvedLibraryResult."
...
This reverts commit 83ca0e87a0 .
Reason for revert: breaks google3
Original change's description:
> Make AnalysisResult.path non-nullable, more non-nullable for ParsedLibraryResult and ResolvedLibraryResult.
>
> Change-Id: Iab3a8c6c81ace30049a93d0a453e2473634ba07a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195058
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: Iecaa81064450f536a45235d4d79d3b212a93918b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195188
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-14 00:41:59 +00:00
Konstantin Shcheglov
83ca0e87a0
Make AnalysisResult.path non-nullable, more non-nullable for ParsedLibraryResult and ResolvedLibraryResult.
...
Change-Id: Iab3a8c6c81ace30049a93d0a453e2473634ba07a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195058
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 18:05:28 +00:00
Brian Wilkerson
7f54fc96e5
Add documentation for several more codes
...
Change-Id: I012db56773acee6a81fbb6a33958beb686793ec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-28 21:16:11 +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
Brian Wilkerson
a8ef9f4df1
Add documentation for more diagnostics
...
Change-Id: I8a2e328fef54e77378558514bf2b62f186fe3451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-01-19 18:15:13 +00:00
Sam Rawlins
56cf16887c
Analyzer: Don't report on prefixed import with illegal references
...
Bug: TODO from https://github.com/dart-lang/sdk/issues/38784
Change-Id: I4ecdaf333c2613eb5fa0c57e4a8f8be56c35bb21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175184
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-07 01:27:25 +00:00
Sam Rawlins
e0ebe30190
analyzer: Improve unused_import analysis for shared prefix names
...
Fixes https://github.com/dart-lang/sdk/issues/38784
Change-Id: I42b32261e9ed71018967e228d2ec731a4613205d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147336
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-03 04:00:37 +00:00
Konstantin Shcheglov
b4052982b5
Make documentaiton comments Null Safe by default, support %language directive instead.
...
This is consistent with what we do for user project.
Null safety is not an experiment anymore.
OTOH, any future experiments should be applied on top of the latest
language version.
Change-Id: I6dcbc954aefefb1f7a03c9ceaf1d25be28e7adf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-01 06:51:44 +00:00
Konstantin Shcheglov
23b9cce2a1
Issue 43777. Update analyzer/ tests to run when Null Safety is enabled by default in 2.12
...
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: If7e5f71fe1d8277898a02745f96f1c8003cc8069
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168240
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-10-19 16:40:17 +00:00
Paul Berry
88980bf724
Fix verify_diagnostics_test.dart.
...
This was broken by a4b2047d9d .
Bug: https://github.com/dart-lang/sdk/issues/43263
Change-Id: Ia9bdec633861172c06b30fbe8260b648f1fee39e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161661
Auto-Submit: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-03 05:15:23 +00:00
Paul Berry
8d12c07cce
Work around redundant hint with unnecessary null comparison.
...
This should fix analyzer bot failures triggered by
https://dart-review.googlesource.com/c/sdk/+/155926 .
Bug: https://github.com/dart-lang/sdk/issues/43051
Change-Id: Ie4650a72611c63798054b4f4aad9dfa7d76ad0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158486
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-14 17:53:38 +00:00
Konstantin Shcheglov
833650aa45
Use package_config.json in tests.
...
R=brianwilkerson@google.com
Change-Id: I4488a285ae72b02e6771a36c8a44df3ea0c97393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 19:05:06 +00:00
Konstantin Shcheglov
5bd3e5a63f
Use PubPackageResolutionTest for diagnostics snippets.
...
Change-Id: I4fd0e38d0ab431f96056fba0819ddefefea72e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-07 16:45:07 +00:00
Konstantin Shcheglov
70aa3ac534
Update verify_diagnostics_test after moving to CompileTimeErrorCode.
...
TBR
R=brianwilkerson@google.com
Change-Id: I5a12ca2bfc0853563e2574644b6e74b0456e8629
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155922
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-26 21:05:43 +00:00
Brian Wilkerson
ab73158758
Fix the windows bot and update MockSdk
...
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.
Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-22 14:34:25 +00:00
Brian Wilkerson
88876d5642
Add documentation for most of the Null Safety diagnostics
...
This also updates the testing framework to allow experiments to be
specified with code snippets so that the examples can be tested.
Change-Id: Ifd15c321fef60c736124d368f4d6bfa947460fe8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-04-19 15:24:59 +00:00
Konstantin Shcheglov
b63e3f9425
Replace AnalysisOptions.enabledExperiments with contextFeatures.
...
There should be just one source of FeatureSet, so that when we add
--default-language-version flag, we apply it to the FeatureSet, and
set as the default for the context.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: If140768bb51db1b0f736b91ab5d624e22100405e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135347
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-02-11 20:16:14 +00:00
Brian Wilkerson
7d7643c2ad
Add newly reviewed docs and change section header everywhere
...
Change-Id: I337fe5764b9167240b42cf75f908a3d36ef08cc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133407
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-26 22:56:45 +00:00
Brian Wilkerson
43066c9911
Add newly reviewed diagnostic docs
...
Change-Id: I1a090ebd0129040a5fcbf2fca3919c6e22cf1daa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-12-13 17:55:29 +00:00
Konstantin Shcheglov
364dd8936b
Fix unnecessary_new in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 01:11:30 +00:00
Brian Wilkerson
ad021d02d4
Integrate the latest batch of reviewed diagnostic docs
...
This includes a small improvement to the validation tests, but there is
also one code whose docs can't be verified without additional work that
I will do in a follow-on CL.
It also includes splitting one code into two to improve the messages.
Change-Id: I52989ca336e42822327e3ac3805b1654d20a479c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125901
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 15:21:55 +00:00
Konstantin Shcheglov
a006914279
Enable prefer_contains and no_duplicate_case_values.
...
R=brianwilkerson@google.com
Change-Id: I2ad2754b587c00d40811f6e5710b30d9111b828a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-09-30 14:25:36 +00:00
Brian Wilkerson
a2803a1b2d
Add documentation for more diagnostics
...
Change-Id: I8270a74cc5a70dd16a46e3a7b2ff2bb822b69fb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-09-25 16:38:06 +00:00
Brian Wilkerson
c74e68e501
Add documentation for more diagnostics
...
Change-Id: Id2aeb13db0ceb81fc18d67e6ef2778304b36d02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-09-12 16:35:46 +00:00
Brian Wilkerson
d36f5ed181
Fix diagnostic documentation tests and add support for documenting parser codes
...
Change-Id: Ie2e360e6e4a344888bb409d20f21c969280bbdf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-09-11 19:45:47 +00:00
Jens Johansen
74e09abc6e
[CFE] Remove/move file that wasn't needed by frontend; cleanup pubspec.yaml a bit
...
Change-Id: I204b844e7f1cb892a529bca3a13017ed836275f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114074
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-08-23 07:42:03 +00:00
Brian Wilkerson
7820e807a6
Add missed type annotations and sort
...
Change-Id: I07f0b96d2595a676ee8456bbcb353852adb37f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-10 16:47:52 +00:00
Brian Wilkerson
3a8d755989
Change the delimiters used to mark highlight ranges in diagnostic documentation
...
Change-Id: I4eb2c44ea4eb2a054eccbb4a6ab64a01d2866042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108506
Reviewed-by: Kathy Walrath <kathyw@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-09 22:12:07 +00:00
Brian Wilkerson
c3a1670c00
Attempt to fix the windows bot again
...
Change-Id: Iefce582101c3efc736ef640d42c03b3e35b9e9ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108505
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-09 21:50:45 +00:00
Brian Wilkerson
a6afc5a9b0
Disable tests under windows to fix the bot
...
Change-Id: I93f003f55ca522f6690fd9a8a3a7075666113218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108361
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-08 17:02:02 +00:00
Brian Wilkerson
d914839ce6
Add tests for diagnostic docs
...
This tests that the docs have been generated and that the code samples
in the docs generate the expected errors at the expected locations.
Change-Id: Iff254537c15c58d6c5dde2bb2bb739e52f156b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-08 13:36:14 +00:00