Sam Rawlins
237c84249b
Remove unnecessary imports in analyzer
...
Change-Id: Ifb9a5c0a31cf3669febf2981b1d26b84f5b9d237
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-02-02 14:40:24 +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
Devon Carew
2ba123b86e
[analysis server] remove the --file-read-mode cli option for the analysis server
...
Change-Id: I279233cd0b7ec09a7d2fdcd50837552f56f2584d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-11-12 21:42:50 +00:00
Devon Carew
e7647f2cf2
Revert "[analysis server] remove the --file-read-mode cli option for the analysis server"
...
This reverts commit 1caee4d1fd .
Reason for revert: This breaks google3 - we need to update the linter's use of the analyzer API.
Original change's description:
> [analysis server] remove the --file-read-mode cli option for the analysis server
>
> Change-Id: Id07e3655cb4bcfc462ada0db8257e7cf584272f5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171101
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Devon Carew <devoncarew@google.com >
TBR=devoncarew@google.com ,scheglov@google.com ,brianwilkerson@google.com
Change-Id: I68294ad8b565a94aa098e65276b78e9745eec5a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171640
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-11-11 20:10:41 +00:00
Devon Carew
1caee4d1fd
[analysis server] remove the --file-read-mode cli option for the analysis server
...
Change-Id: Id07e3655cb4bcfc462ada0db8257e7cf584272f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-11-11 19:30:23 +00:00
Sam Rawlins
466f2fd8a7
Analyzer: prepare some generated/ tests for null safety
...
Change-Id: Ieca714d8b32b7b283a8dc30dd820df07d1e64655
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-06 14:34:02 +00:00
Konstantin Shcheglov
a51f1747e0
Prepare to publish analyzer 0.40.0 and _fe_analyzer_shared 8.0.0.
...
Change-Id: I126207dcc47885565a3a6d7002ff15ad3cc493c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-18 15:12:10 +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
Konstantin Shcheglov
11fa3e0e2b
Don't extent EngineTestCase where possible.
...
R=brianwilkerson@google.com
Change-Id: I6489a9bbe0bd442d1356c34fcedfde811e6f9778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118505
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-09-24 14:05:19 +00:00
Konstantin Shcheglov
f7472249a2
Remove EnumMemberBuilder.
...
R=paulberry@google.com
Change-Id: If92fc95598cc2530b882d270efb97664fce4176a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117983
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-09-19 16:08:16 +00:00
Konstantin Shcheglov
fc2f744d9e
Deprecate 'Source.encoding'.
...
R=brianwilkerson@google.com
Change-Id: I1a97c9b5a1401a16044df4e37117b2ec7e4e5db2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-09-12 16:48:16 +00:00
Paul Berry
a2e1434603
Breaking changes for analyzer version 0.37
...
Change-Id: I65a16ab2d2ca05de701c27f08300de85a6316b41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99880
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-02 03:59:49 +00:00
Konstantin Shcheglov
631c550ff9
Extract and migrate ExitDetector and its tests.
...
R=brianwilkerson@google.com
Change-Id: I4d3699ffab56d85240809fe50b36c1593e4e19d2
Reviewed-on: https://dart-review.googlesource.com/c/92027
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-06 01:54:55 +00:00
Konstantin Shcheglov
b5eb7d463e
Extract and migrate ErrorReporter tests.
...
R=brianwilkerson@google.com
Change-Id: I5fd12bdd3dc6bacbec61ad9b722a0016cbde2229
Reviewed-on: https://dart-review.googlesource.com/c/92024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-05 19:16:15 +00:00
Brian Wilkerson
35ab1755f4
Support more type propagation for code-as-ui features
...
Change-Id: I9f7d93387653cc279dc657e689764d19a6d31858
Reviewed-on: https://dart-review.googlesource.com/c/91766
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-02-04 21:55:21 +00:00
Konstantin Shcheglov
849285276d
Extract and migrate ElementLocator tests.
...
R=brianwilkerson@google.com
Change-Id: I10914580c96daee9bae8794db477c6413a089c09
Reviewed-on: https://dart-review.googlesource.com/c/91850
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-03 17:26:46 +00:00
Paul Berry
c9b1877cbf
Disable task model for clients by making WorkItem inconstructible.
...
The task model is still allowed in analyzer tests since we still have
some unit tests of non-task-model functionality that rely on the task
model to do their testing (see #35734 ).
Unit tests whose sole purpose was to test the task model have been
removed. Test files that now empty have been removed. Non-empty test
files that now contain no tests of their own have had their `main`
functions removed, and have been renamed so that the testing
infrastructure will no longer attempt to run them.
Change-Id: I8b4d0b2dde9337c4e1fe91e443a2c9da6eee8f4f
Reviewed-on: https://dart-review.googlesource.com/c/90720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-01-24 16:29:17 +00:00
Brian Wilkerson
6c2ea4936a
Clean up several deprecation hints
...
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 01:05:24 +00:00
Konstantin Shcheglov
d09c1265e9
Issue 35467. Move ast_type_matchers/element_type_matchers into test/util/.
...
R=brianwilkerson@google.com , paulberry@google.com
Fixes https://github.com/dart-lang/sdk/issues/35467
Change-Id: I2aab476e2e88f5bdbf5e62a2104ff7d271a73209
Reviewed-on: https://dart-review.googlesource.com/c/88780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-09 04:46:39 +00:00
Brian Wilkerson
0fb5974ba0
Improve the error reporting when the same-named types are used as type arguments (issue 33946)
...
Change-Id: Ic83dea89e4ad51d923f1d147fe4c54e129549fa8
Reviewed-on: https://dart-review.googlesource.com/c/87425
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-17 21:10:34 +00:00
Konstantin Shcheglov
162d0d12b0
Remove EngineTestCase.assertInstanceOf and extract ast/element TypeMatcher(s).
...
R=brianwilkerson@google.com
Change-Id: I9c47b4a7426dccafb8d3ffc1b0652da0106f2184
Reviewed-on: https://dart-review.googlesource.com/c/87302
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-14 17:51:27 +00:00
Brian Wilkerson
01e0df71a8
Stop unnecessarily extending Object
...
Change-Id: Ib557755916b09be4e1ad1b1c2e4bed052a280513
Reviewed-on: https://dart-review.googlesource.com/c/84640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-16 16:43:24 +00:00
Brian Wilkerson
f0f3f445a7
Add a version of getAncestor that matches by type without a closure
...
Change-Id: Ib10ab78284466b04b47b6480aded9d3535c79b12
Reviewed-on: https://dart-review.googlesource.com/c/83642
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-08 20:43:57 +00:00
Konstantin Shcheglov
0eb0fd0c8e
Avoid using resourceProvider.convertPath() where possible.
...
R=brianwilkerson@google.com
Change-Id: Ie0969ef41e2afaa8f7f8b25af1422ea26a509d79
Reviewed-on: https://dart-review.googlesource.com/c/82662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 17:53:50 +00:00
Brian Wilkerson
a074a87b25
Convert more analyzer tests to use ResourceProviderMixin
...
Change-Id: I0b6d54501a7f52f0b8ae2faa72992cd22dfc6c58
Reviewed-on: https://dart-review.googlesource.com/77600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-02 16:57:43 +00:00
Konstantin Shcheglov
1bceca91b0
Remove the 'name' constructor parameter from CompilationUnitElementImpl()
...
It costed us about 1.2% of total analysis time.
The whole information about a unit is available in its Source.
R=brianwilkerson@google.com
Change-Id: Iffa253d1eae1a466c10766f66c6c677e19be124a
Reviewed-on: https://dart-review.googlesource.com/77220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-28 21:53:24 +00:00
Konstantin Shcheglov
48a1504b2f
Stop reporting CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER and CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER.
...
These errors were removed from the spec.
See also https://github.com/dart-lang/sdk/issues/33235
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/34331
Change-Id: Ibc675aa48165300ddac32a8d6ddef4d84d41952a
Reviewed-on: https://dart-review.googlesource.com/72903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-09-04 20:29:06 +00:00
Brian Wilkerson
87f753dbd3
Replace some declarations of element with declaredElement
...
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2018-08-02 16:00:36 +00:00
Brian Wilkerson
7054d92a02
Remove some classes from the analyzer public API
...
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-24 15:28:15 +00:00
Brian Wilkerson
1560f19844
Fixes to make analyzer preview-dart-2 safe, part 1 of many
...
Change-Id: I8f88168a1fab61b3d0d808b5d9e09e6391325302
Reviewed-on: https://dart-review.googlesource.com/46953
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-19 13:15:46 +00:00
Dan Rubel
87a3998f71
Improve local variable recovery
...
Change-Id: Ib3d84d2e40bbadee6bf1ccf81c6afb9669765e84
Reviewed-on: https://dart-review.googlesource.com/26901
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-12-07 15:28:15 +00:00
Paul Berry
c084df4747
Remove deprecated DirectoryBasedDartSdk.
...
This class has been deprecated for over a year, and I believe all uses
of it have been removed.
Change-Id: I42c39339b08bb98271000c2a459d3045388ec9ce
Reviewed-on: https://dart-review.googlesource.com/17520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-10-31 17:13:40 +00:00
Konstantin Shcheglov
8e94406288
Remove DirectoryBasedSourceContainer and its test.
...
This is the only test from pkg/analyzer/test/test_all.dart suite
that fails on my Windows machine. Given that the class has not been
used for ages, it is easier to remove it.
R=brianwilkerson@google.com , paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/21772
Change-Id: I110825f44915dde354af22e73e2d376231c08b0d
Reviewed-on: https://dart-review.googlesource.com/7943
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-23 16:41:24 +00:00
Terry Lucas
0585e74b63
Fixed analyzer test to use dart2js not dartium
...
R=paulberry@google.com
Committed: https://github.com/dart-lang/sdk/commit/704de3bb3e27313c0eb6eb5ebc03173a5396dd1e
Review-Url: https://codereview.chromium.org/3004153002 .
2017-09-01 09:03:16 -07:00
William Hesse
e61f6e72ee
Revert "Fixed analyzer test to use dart2js not dartium"
...
This reverts commit 704de3bb3e .
This is needed because we reverted the commit that this was a follow-up to:
4a58918382
It was reverted in a8cab7a205
TBR=terry@google.com
BUG=
Review-Url: https://codereview.chromium.org/3004183002 .
2017-09-01 01:41:25 +02:00
Terry Lucas
704de3bb3e
Fixed analyzer test to use dart2js not dartium
...
TBR=paulberry@google.com
Review-Url: https://codereview.chromium.org/3004153002 .
2017-08-31 12:25:29 -07:00
Konstantin Shcheglov
bf25080cc1
Replace typed_mock with mockito in analyzer.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2991913002 .
2017-07-27 16:15:17 -07:00
Konstantin Shcheglov
00d5012906
Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...
...instead of mixing formatting with actual changes in many CLs.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Brian Wilkerson
1b4679cacd
Clean-up several warnings
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2912883003 .
2017-05-30 09:04:41 -07:00
Devon Carew
3fd497b510
Ignore some uses of deprecated APIs.
...
BUG=
Review-Url: https://codereview.chromium.org/2796483002 .
2017-04-03 08:31:00 -07:00
Konstantin Shcheglov
3e148a8277
Run statements parsing tests with Fasta.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2745233004 .
2017-03-14 10:24:20 -07:00
Paul Berry
67463b0f7d
Make some parser test helper methods non-static.
...
This paves the way for allowing more of analyzer's parser tests to be
run on both Fasta's parser and the analyzer parser.
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2683543006 .
2017-02-08 08:24:55 -08:00
Konstantin Shcheglov
9567d2934a
Implement UriResolver.restoreAbsolute() for DartUriResolver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2640793005 .
2017-01-18 14:12:42 -08:00
Konstantin Shcheglov
9d240f8fb1
Replace reset() arguments with resetWith() invocation.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2627083003 .
2017-01-11 13:37:22 -08:00
Konstantin Shcheglov
41f8d695b0
Fix an analysis error in tests.
...
TBR
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2622323002 .
2017-01-11 09:22:14 -08:00
Konstantin Shcheglov
65ff5b5e50
Explicitly compute analysis results for sources to check errors.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2625783002 .
2017-01-10 12:58:58 -08:00
Konstantin Shcheglov
5a3afed30f
Make error producing tests ansynchronous.
...
This is another preliminary test to run these tests with the new
analysis driver. Especially when we're going to replace the task based
analysis implementation with another one.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2624793002 .
2017-01-10 10:33:44 -08:00
Paul Berry
05a6045674
Rename AstFactory -> AstTestFactory.
...
This paves the way for introducing a new AstFactory class that will be
part of the analyzer public API.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2524903002 .
2016-11-22 16:09:51 -08:00
Konstantin Shcheglov
13d2420a3d
Extract ElementBuilder tests into a separate file.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2430723002 .
2016-10-18 10:22:45 -07:00
Konstantin Shcheglov
e1f8a0a103
Begin separating API and local element builders.
...
I will write separate tests for them and do some more clean up in
separate CLs.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2425853003 .
2016-10-18 08:22:30 -07:00