Commit Graph

490 Commits

Author SHA1 Message Date
Konstantin Shcheglov 1b9cc28879 CQ. Make FileSource API, move to lib/source.
Change-Id: I981d3f0904917ada322ca06448f03ff33ae1f095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369360
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-06-03 00:36:59 +00:00
Konstantin Shcheglov d696014fe5 CQ. Stop using File.createSource() in analysis_server/.
This mixes layers, which I believe one of the ways that cause large
library cycles.

Change-Id: Id7124b9f4e4bf81838f637255fe04fd28f5fda01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-31 19:43:58 +00:00
Keerti Parthasarathy 11e4f4574f Reland Workspace changes.
Fix lints that were showing up in flutter code.

Change-Id: Id5e2cbae347fd2c5d73418ce5af6ce579b62e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349629
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-02-05 17:33:09 +00:00
Jackson Gardner e9590179fe Revert "Refactor PubWorkspace into PackageConfigWorkspace"
This reverts commit 43fb59f4dc.

Reason for revert: Breaking Dart SDK -> Flutter Engine roller. See https://github.com/flutter/flutter/issues/142253

Original change's description:
> Refactor PubWorkspace into PackageConfigWorkspace
>
>  - use package_config.json as marker file for workspace.
>  - workspace can have multiple packages, they can be either PubPackages (marker pubspec.yaml) or BasicWorkspace.
>  - add package info (pubspec) to resolution salt.
>  - removed duplication of finding package_config.json from ContextLocator, as this is now done while creating workspace.
>  - some test/s setup/expectations were changed since we now use package config as marker for workspace instead of pubspec.
>
> Change-Id: I091a4a686c6b1d8c14858aefd9843a8d9c8efa25
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345346
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I59adf5b26d25e360bcf962323db688156774c767
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2024-01-25 21:00:47 +00:00
Keerti Parthasarathy 43fb59f4dc Refactor PubWorkspace into PackageConfigWorkspace
- use package_config.json as marker file for workspace.
 - workspace can have multiple packages, they can be either PubPackages (marker pubspec.yaml) or BasicWorkspace.
 - add package info (pubspec) to resolution salt.
 - removed duplication of finding package_config.json from ContextLocator, as this is now done while creating workspace.
 - some test/s setup/expectations were changed since we now use package config as marker for workspace instead of pubspec.

Change-Id: I091a4a686c6b1d8c14858aefd9843a8d9c8efa25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345346
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-25 13:08:44 +00:00
Konstantin Shcheglov 3ab4358f33 Macro. Dispose AnalysisContextCollection(s) in analyzer_cli/
Change-Id: I0392f591c51c8eb1faef7b065ddfac18b1864e6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347201
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-19 00:05:17 +00:00
pq 7b7dfa6bb5 add analysisOptions to FileResults
See: https://github.com/dart-lang/sdk/issues/54667

Change-Id: I5d756e9f8ba2282c7c022a8dc6c11fe4da254a3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 22:05:18 +00:00
Konstantin Shcheglov 5df56a153c Add 'content' to FileResult.
Change-Id: I8600aed3beb712b4da9e4a157b2e87398057a9cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346902
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 20:35:10 +00:00
Paul Berry c46b63d2c7 Disable legacy code support in the analyzer.
Before this change, the analyzer supported analyzing legacy code if
the (somewhat confusingly named) global variable `noSoundNullSafety`
was set to `false`. This was used to support legacy code while google3
was still migrating to null safety.

Now that the internal migration process is complete, the analyzer no
longer needs to support legacy code. As a first step in removing that
support, this change removes the `noSoundNullSafety` flag and all the
unit tests that made use of it.

From this point forward it will not be possible to use the analyzer to
analyze code that has a Dart language version less than 2.12.

Change-Id: Idce4b271d1cfc43d25251b7a899259d62b421caf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345365
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-12 17:05:58 +00:00
pq 12598e6b0f deprecate analysis options sdkVersionConstraint getter
Noteworthy:

* deprecates the `sdkVersionConstraint` getter and updates uses
* migrates tests for sdk contstraints in the absence of a pubspec from context_builder_test to analysis_context_collection_test
* makes `pubPackages` getter broadly visible

Next step: remove the code that sets the `sdkVersionConstraint` in the analysis options object and remove the getter.


Change-Id: I443cdd15ec8d28ac6fa6786e06c1e4b027eee747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-12-12 00:20:50 +00:00
Konstantin Shcheglov ebf05be9b8 Macro. Add isMacroAugmentation to FileResult.
Change-Id: I5aa887212338bfc80a3f6cb15310f06ad1b2b48f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339107
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-30 21:30:23 +00:00
pq bec6e82853 migration to driver.getAnalysisOptionsForFile (continued)
Change-Id: Ia22286786febe7e915df0d7e7b18b9657fef2b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-14 22:41:28 +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
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
pq 7cf32a83dc Reland "add a file property to FileResults"
This is a reland of commit 18c8a50557

Original change's description:
> add a `file` property to `FileResult`s
>
> Change-Id: Ibec62da4552da3124d85f6020f4e8e1dac8a757b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333588
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: Ia6e04cdf73e55c100fe5e2b5b6678f1c6bffc327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334361
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-11-07 15:52:12 +00:00
Phil Quitslund ae088632b3 Revert "add a file property to FileResults"
This reverts commit 18c8a50557.

Reason for revert: windows path-related test failures

Original change's description:
> add a `file` property to `FileResult`s
>
> Change-Id: Ibec62da4552da3124d85f6020f4e8e1dac8a757b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333588
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: I0eea9e0a40b0c2a65795013fca129a03b3759e37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2023-11-06 22:40:20 +00:00
pq 18c8a50557 add a file property to FileResults
Change-Id: Ibec62da4552da3124d85f6020f4e8e1dac8a757b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333588
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-06 19:28:11 +00:00
Sigurd Meldgaard 86ecb7185e Support for # ignore: comments in pubspec.yaml
Contains quite a bit of refactoring. One big change is that `PubspecValidator.validate()` now also finds lints. Not sure we want this, but it seemed desirable to me. (Otherwise there was no central place to filter the lints through the ignores).

Change-Id: Ic8a463a9718fb29bec0d4f7e849b6da7799aebc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-10-13 12:44:09 +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
Jonas Finnemann Jensen 43c8d637bd Refactor PubspecValidator
Unclear, if this was intentionally written as classes.
It just seemed confusing to me. Since the classes were essentially
functions that had some of their arguments passed in the constructor
and some of their arguments passed in a method call.

It also seemed impossible to reuse the actual objects.

Change-Id: I56b341ee4851d24b9d176857a53b96f7eb941335
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317883
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-16 12:31:30 +00:00
Brian Wilkerson 14ff1f2d35 Generate a diagnostic for language overrides prior to 2.12
Change-Id: Ia10cf89443208ef133dd1ce8d68ee7c6b4129fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-01-10 05:27:48 +00:00
pq 5b2d70625a process sdk constraints in options validation
Change-Id: I3326d3b894939b26289416b66239bf98d31d8309
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-01-06 23:50:48 +00:00
Sam Rawlins e0b193959f [test_runner] move hint filtering out of analyzer_cli into test_runner
Fixes https://github.com/dart-lang/sdk/issues/50887

Change-Id: I770b56b908d76f728f58b96e57928c412eebbafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278370
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-01-06 16:51:53 +00:00
Sam Rawlins caa14a5eea Filter out ignored diagnostics in analyzer_cli when JSON reporter is used.
Fixes https://github.com/dart-lang/sdk/issues/50757

Change-Id: I76a7452d6c2f5977c64765c49f0ec949f1f9fadb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276182
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-17 03:02:28 +00:00
Sam Rawlins 5f8ef7be53 Enable new linter rules in analyzer packages
Change-Id: Id0182648a347a05cbf6e1483a0afe94219268853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-21 23:02:38 +00:00
Konstantin Shcheglov afb9609261 Deprecate buildSdkSummary2(), use buildSdkSummary() instead.
Change-Id: Iaceb38251047ba4d2cb3e051c096f148b810fbb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265407
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 22:32:48 +00:00
Janice Collins 5ce344ddcd Remove more unused analyzer_cli options for strong mode, implicit casts, implicit dynamic, and declaration-casts.
Bug: https://github.com/dart-lang/sdk/issues/49537
Change-Id: I57e41e1ab82c3486d90c858c400d073645f56b36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252869
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-03 17:16:35 +00:00
Konstantin Shcheglov 2c54a11c23 Add 'FileResult.isAugmentation' and 'isLibrary'.
Change-Id: I862a21d5abdefce14ad48a1043d90f0a32fc6994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-01 21:07:44 +00:00
Konstantin Shcheglov fd0d3b2546 Use named parameters for ResultImpl constructors.
Change-Id: I93bc4738259257b2a0326dc259c43693da5754c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-31 23:00:53 +00:00
Konstantin Shcheglov eddd4f4427 Renames for FileState kinds / directives.
Change-Id: Ia024eb8922b06a0bdb37321f76a7527dc7e3c117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-18 17:20:33 +00:00
Konstantin Shcheglov 7b7a466578 Deprecate LibraryElement.parts
Change-Id: Iade5a3c2e60901de6b10b690d95a605d96eab2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250788
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-08 01:23:05 +00:00
Janice Collins e02bc1fd4d Remove more unused/previously deprecated options in old analyzer cli.
Change-Id: I4b09fa5676a8cdb0eb3d9774f0528f035a278fb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250789
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2022-07-07 22:18:48 +00:00
Janice Collins e499586ad6 Remove the lints fatal flag for old dartanalyzer.
Change-Id: I5a1744261e8a6c14393830cb2ede4e54462a6b58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250775
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2022-07-06 21:03:01 +00:00
Konstantin Shcheglov 7abfcfb83c Move 'libraryFiles' to LibraryFileStateKind.
Change-Id: Id0dd01322a2c43a678c9b0cfc9d8249f15a8cc2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250115
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-29 15:49:35 +00:00
Sam Rawlins 567b45fb1d Add the enable-experiment flag back to DAS
Bug: https://github.com/dart-lang/sdk/issues/48960
Change-Id: I6576f45e63e28902986db844df49a06a71385704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245202
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-06-16 16:26:39 +00:00
Konstantin Shcheglov 74d1c7ffdb Use LibraryFileStateKind where a library is expected.
Change-Id: I871caa74d9b3630c07b78bee85946c4bed5aa8ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-01 20:43:54 +00:00
Konstantin Shcheglov 3d69c3c0c4 Restore sync file methods in AnalysisSession.
There are clients, like `built_value` that cannot be updated.

Change-Id: I27371018039f22cd7ca2cb82b30ec33469aa6e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 23:27:57 +00:00
Konstantin Shcheglov 27f5f486f6 Make link() async, propagate async.
Change-Id: Ie74c8acdf2641e834d41e56200f33075e6987236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237928
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 22:11:57 +00:00
pq 47a52fc5de lint 2.0 fixes
In anticipation of lints v 2.0.

See: https://dart-review.googlesource.com/c/sdk/+/237746

Change-Id: I42bcdfa43d4707324622b498c57dde6e2fe1f13b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-17 23:11:28 +00:00
Konstantin Shcheglov d72934449f Deprecate 'Resource.parent2', use 'parent' instead.
Change-Id: Icf3cefa8061543a3965e1eedab4b57bb6c67c920
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 22:11:23 +00:00
Konstantin Shcheglov 81860accbc Add AnalysisDriver.getFile(), deprecate getFileSync()
Change-Id: I2881c03813740c421f1b4a4be96549e4a91be519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 21:26:13 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Devon Carew 150df0637f [analyzer] remove the dep on package:cli_util
Change-Id: Ie5b0c29ae443588c501dd2012e645618aff17ca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-06 05:26:40 +00:00
Konstantin Shcheglov 95644dcde5 Stop using the remaining methods of StringUtilities.
Change-Id: I099c4f79f2cd5dede474412e72d6d53ef555deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:50:01 +00:00
Konstantin Shcheglov 3ab1eaa03f Migrate analyzer_cli to null safety.
Change-Id: I03184d7b3257802a90eacfb1ea912977f2082c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-11-20 03:23:38 +00:00
Konstantin Shcheglov fb05622b3b Deprecate Source.uriKind
We almost can remove it.
Unfortunately surveyor/lib/src/analysis.dart uses it, so we need to
update it first.

Change-Id: I239d24506f99183147bf45744a6f8d66d3eb4f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-11-19 18:29:07 +00:00
Konstantin Shcheglov e916841bcc Deprecations and renames for getXyz() in AnalysisDriver.
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/405055453/OCL:405055453:BASE:405057194:1634949541100:f811db8d/targets

Change-Id: I8f7f036003650611760523dd315ba89724a29b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217805
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:15:33 +00:00
Konstantin Shcheglov ddc7523958 Issue 45267. Support for --packages in analysis server.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: Iac7dd7502b6936bab91279ac5db7cdafaa90c580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212271
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 17:33:15 +00:00
Konstantin Shcheglov f258c7fe62 Issue 45556. Analyze a requested file, even if it is excluded.
Bug: https://github.com/dart-lang/sdk/issues/45556
Change-Id: I5077759b2929540a3631712a09fce951c3732b51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207400
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-20 18:27:13 +00:00