Danny Tuppeny
226ec8413e
[analysis_server] Pre-emptively opt some tests out of newline normalization
...
Currently newline normalization is opt-in for server tests because there are many tests that fail when the newlines are normalized to the current platform. This change pre-emptively opts-out a number of tests that fail so that the default can be flipped, and then these tests could be worked through.
See https://github.com/dart-lang/sdk/issues/60234
Change-Id: I19f5121612fbc9da18ad0edbe631549e04553e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-04-22 10:21:00 -07:00
FMorschel
f276d3c65b
[cq] Using TestCode and normalizeSource for quick-fix tests
...
This change introduces `TestCode` and `normalizeSource` into the tests for quick fixes. The goal is to add these capabilities to `AbstractSingleUnitTest`, allowing a future update to replace offsets in tests with markers.
Bug: https://github.com/dart-lang/sdk/issues/60234
Change-Id: I760e6b5fb13b37d4e35278073a78f4d755deda64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415260
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-03-19 17:35:20 -07:00
Brian Wilkerson
42bdd6071f
Add support for a zero-length marker in test code
...
Change-Id: I44642ecbb09d8fc2c3b86400f5d388c74d6fb3d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-03-19 12:18:40 -07:00
Brian Wilkerson
38d8834c07
[cq] Reduce assignments to testCode to 1
...
The purpose for this change is to make it easier to use `TestCode` to
parse the code under test. This, in turn, will allow us to use the same
markdown in all of our test code, making it easier to write and read
our tests. This biggest blocker to that goal is the fact that we assign
to `testCode` in several places, and that's the problem solved by this
change.
Change-Id: Id88463925587ff0839fe75faf6a1d083a1b3320c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415700
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-03-15 07:34:29 -07:00
Sam Rawlins
fbf331e0dd
DAS: reformat source code with tall-style
...
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-11-06 23:04:00 +00:00
Kallen Tu
fe10dec12b
[analysis_server] Avoid suggesting modified classes and mixins in contexts that don't make sense.
...
Change-Id: I0a5ebc1812998358d20a579d496ac3a26dec17fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-23 21:44:19 +00:00
Brian Wilkerson
de36e1cfb7
Enable patterns in server tests
...
Change-Id: I1d256b4c1c0cc20cb3e46087cd896d0920f82690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-08 02:12:14 +00:00
Jens Johansen
e860cf241b
[parser] Empty record
...
https://github.com/dart-lang/language/pull/2535
Change-Id: I8241119ee858ce39673472056b88c9393799e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262600
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-10-06 06:34:58 +00:00
pq
16b436151a
migrate server to recommended lints
...
See: https://github.com/dart-lang/sdk/issues/48785
Change-Id: I1bec40cc0b52e5df5f07c35ec993e08c56a59cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240907
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2022-04-12 13:34:12 +00:00
Brian Wilkerson
66aa132c84
Cleanup invalid declarations of main, part 2
...
Change-Id: Ic9626a500a8ceb4b9b0518e911658b96968d845f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205063
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-06-28 18:14:02 +00:00
Brian Wilkerson
ecdb3689b9
Migrate widget descriptions
...
Change-Id: I2c6cd72b5572ff30642a5c836adea8839fe2e964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 14:08:16 +00:00
Brian Wilkerson
9b1583101e
Migrate statement completion support
...
Change-Id: I9d6751888286e4a068fc1dac192c93ffb8089b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194963
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-11 15:28:25 +00:00
Konstantin Shcheglov
e97f1bdbf0
Switch analysis_server to language 2.12, so null safety, but opt-out files.
...
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.
Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-30 23:39:37 +00:00
Brian Wilkerson
2f3c274632
Clean up some code in analysis_server
...
Change-Id: Icaa4cc19d1966e3dbc70f82745e4fd771a18ed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190728
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-12 04:45:39 +00:00
Brian Wilkerson
d7b3812f51
Remove a duplication of analysis from some tests
...
Change-Id: Ib358b943519172afaf32ba9185ebec96c57beeda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-11-10 19:15:26 +00:00
Brian Wilkerson
0d222cc712
Throw an exception when an attempt is made to produce conflicting edits.
...
Change-Id: I826cd1771a61685f76314b3ec0125cfc0364b700
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170800
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-11-10 15:56:06 +00:00
Konstantin Shcheglov
a074c793b8
Rename to resolveTestCode() and resolveTestFile().
...
Change-Id: I69a598c5acef86c6a59212648496569423007ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-10-27 19:35:47 +00:00
Konstantin Shcheglov
d9d7324b27
Issue 43777. Update analysis_server/ tests to run when Null Safety is enabled by default in 2.12
...
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: Ibd1da16b58b8304d6f1d4260615c7049fc5ffe59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2020-10-27 18:19:33 +00:00
Brian Wilkerson
8969b1839c
Enable omit_local_variable_types in analysis_server
...
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-03-30 03:58:44 +00:00
Brian Wilkerson
d6206fbbc7
Add return types to more tests in analysis_server
...
Change-Id: Ib85d299a34cfda6bc4772d53f16d9ba44251bfbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-30 14:30:18 +00:00
Brian Wilkerson
5584c96fde
Enable prefer_single_quotes in analysis_server
...
All of the changes except in the analysis options file are from dartfix.
Change-Id: Icd9bf02ad07f71d1fc365979c7dfe18a792dc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-21 17:52:52 +00:00
Brian Wilkerson
4043a6fce3
Remove unnecessary uses of new in analysis_server
...
Other than analysis_options.yaml, all of the changes were from running
dartfix.
Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-12-18 19:01:51 +00:00
pq
7235115f36
statement completion for expression bodies
...
See: https://github.com/flutter/flutter-intellij/issues/3253
Change-Id: Ib892833ecfa4500b726f4f6df42f16f0618c994d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118663
Reviewed-by: Steve Messick <messick@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2019-09-25 17:56:45 +00:00
pq
c2ff2ca16d
collection API use de-linting
...
Change-Id: I8879f48d484830ff594295b983363b7e3245f092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108668
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-10 22:49:10 +00:00
pq
52abcd3dd2
apply prefer_equal_for_default_values
...
Change-Id: I9b6fd3ee18ec834a5db3d0d25455b6db9ea4fbe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2019-07-10 19:31:40 +00:00
Brian Wilkerson
47e988b781
Clean up the remaining copyright notices in analysis_server
...
Change-Id: Iee3110f92ab0f24312ddd1eff407d2229f895321
Reviewed-on: https://dart-review.googlesource.com/c/89101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-11 15:38:56 +00:00
Brian Wilkerson
298d22f4ab
remove async parse method
...
Change-Id: I7a2e633b43283221790fb88a12065fed3dcdabb7
Reviewed-on: https://dart-review.googlesource.com/c/82120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-30 19:26:00 +00:00
Konstantin Shcheglov
1c6774ba34
Create AnalysisDriver in AbstractContextTest using the new API.
...
Change-Id: Ia3b8e0fa297026f8d002cf4b29f179e686876d8c
Reviewed-on: https://dart-review.googlesource.com/c/81980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 15:57:59 +00:00
Konstantin Shcheglov
5b1641432d
Create CorrectionUtils only for ResolveResult.
...
So, it is always self-consistent, never ask AnalysisContext for the
unit file content.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I93e71f7f8fa577b8e123c91252f3038a50cdccef
Reviewed-on: https://dart-review.googlesource.com/c/81580
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-26 14:04:12 +00:00
Konstantin Shcheglov
1f52372bfa
Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
...
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.
Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-29 13:46:45 +00:00
Konstantin Shcheglov
ac973e5ba7
Return SourceSpan with actual length from _CompilationMessage.
...
Change-Id: I883a4ce1b6fc63643db259a0d22e0719b460c109
Reviewed-on: https://dart-review.googlesource.com/69005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-10 16:03:42 +00:00
Konstantin Shcheglov
80e08e0913
Use 'useCFE' flag to turn on CFE in AnalysisDriver.
...
R=brianwilkerson@google.com
Change-Id: If0aa7d10bc46f1dd408d0be8128fc25538758359
Reviewed-on: https://dart-review.googlesource.com/68720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 16:12:47 +00:00
Brian Wilkerson
b0de4d8ac0
Add support for and a few additional CFE-based tests
...
Change-Id: I8e52f41cc54341c4321e688ae46a6392e69f98ab
Reviewed-on: https://dart-review.googlesource.com/68500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-06 21:04:02 +00:00
danrubel
a133e78ead
Mark last 2 statement completion tests as failing for now
...
... so that the many other tests will be correctly asserted as passing by the bots.
Change-Id: I382f49b6578574ea2e1ea1adf52aa67241b9ae09
Reviewed-on: https://dart-review.googlesource.com/65460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-07-18 14:10:10 +00:00
danrubel
22998a18fc
Statement completion fixes
...
This fixes all but 2 of the statement completion tests
when the fasta parser is enabled.
Change-Id: I056cb386f46ce489e5ee70f01d9903fa4eb03bf6
Reviewed-on: https://dart-review.googlesource.com/65361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-07-17 22:10:01 +00:00
Devon Carew
17b53a2835
Test out no_implicit_casts on the analyzer source base.
...
Change-Id: I4eb2414d7d9bbe21883c9e5e8eca10f2eaafb465
Reviewed-on: https://dart-review.googlesource.com/62725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2018-06-28 02:20:43 +00:00
Konstantin Shcheglov
9d10a6ad4a
Issue 33034. Fix statement completion with missing condition right parenthesis.
...
Bug: https://github.com/dart-lang/sdk/issues/33034
Change-Id: I87a47e5ddc41596b4bcd0c07d250a7afb00546ef
Reviewed-on: https://dart-review.googlesource.com/53680
Reviewed-by: Steve Messick <messick@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-05-03 17:48:53 +00: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
e454986288
Add code to run more tests from test_all
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2968233002 .
2017-07-06 12:24:01 -07:00
Brian Wilkerson
7d26ff6d4f
Remove some more library directives
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Steve Messick
55097a44b3
Recover from merge problem
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2868383002 .
2017-05-10 13:12:14 -07:00
Brian Wilkerson
6b8a56cd7f
Switch the default from non-driver to driver in several tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2864813002 .
2017-05-07 08:34:16 -07:00
Steve Messick
28b7710190
Complete declarations; detect invalid blocks
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2852073002 .
2017-05-01 08:45:41 -07:00
Steve Messick
17360ffa6d
Add colon to switch cases and default
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2837063003 .
2017-04-25 11:13:54 -07:00
Steve Messick
8c2aae7dee
Fix detection of bad catch-clauses and try-statements
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2842523002 .
2017-04-24 12:00:14 -07:00
Steve Messick
00d04dda08
Add special completion for control-flow block exits
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2834913002 .
2017-04-21 14:51:45 -07:00
Steve Messick
6407af5dcb
Clean up TODOs
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2830793007 .
2017-04-20 15:19:16 -07:00
Steve Messick
b9c214f374
Compete try-statements
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2834513004 .
2017-04-20 13:09:23 -07:00
Steve Messick
0829174516
Complete for-each and switch statements
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2826283002 .
2017-04-19 14:44:41 -07:00
Steve Messick
6a19d96ee2
Complete for-statement
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2824233002 .
2017-04-18 15:20:31 -07:00