Konstantin Shcheglov
dfb3720cda
Changes to analysis_server/ to be compatible with the breaking changes to analyzer/.
...
Change-Id: I606072798633601d78f38c0035b579d93875ef3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-31 17:04:58 +00:00
pq
4894e34f1f
bulk fix for empty_statements
...
Change-Id: I92c2dd5333d9b505a2c37b5936199895ab928fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-31 16:27:10 +00:00
pq
b10f22c7f5
bulk fix for empty_constructor_bodies
...
Change-Id: Iffd3b80e6316372986374dc6b66cae24bd287dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-31 14:30:00 +00:00
pq
2dca5ad318
bulk fix for empty_catches
...
Change-Id: Ia1cc3aefd79968bba0ff43f7ac9016e68ee2195a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156600
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-31 01:29:45 +00:00
pq
2b51d59e69
bulk fix for use_curly_braces
...
Change-Id: Ia1a9fdde3d283cab94455aa4277d26e2d09998cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-31 00:02:24 +00:00
pq
f640e58e45
bulk fix for await_only_futures
...
Change-Id: Ic643ef1fd0e8374ecce7fffff34fc9b6f7e8550c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-30 21:26:04 +00:00
Danny Tuppeny
38fa4aea17
Don't use whole identifier as completion targetPrefix if it's after the cursor
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/2672
Change-Id: I45ccc00990495ddd9fa8881d673a45bf6c4f82d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-30 13:58:28 +00:00
Konstantin Shcheglov
219107cca0
Report INVALID_ASSIGNMENT on the cascade target.
...
https://dart-review.googlesource.com/c/sdk/+/155380 has tests that
show that it is otherwise hard to specify where the offending
expression is.
Change-Id: I8cdbc3d974148d644b75889a8afd921a2a2716cd
Bug: https://github.com/dart-lang/sdk/issues/42865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156067
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-29 23:04:49 +00:00
Konstantin Shcheglov
e60a0315dd
Fix for crash in RemoveEmptyConstructorBody.
...
R=brianwilkerson@google.com
Change-Id: I0fe17e9fe96028c5286f509c3bf9ec16248f4841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-29 22:01:59 +00:00
pq
e12a536edb
bulk fix for avoid_types_on_closure_parameters
...
Change-Id: Id080559bc2a18fd8ce4c8eb59412c4461d8dac39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-29 19:45:25 +00:00
Brian Wilkerson
15fb170ffb
Enable the new code completion relevance feature
...
The new feature will be enabled by default but the option still exists
so that users can disable it if they want/need to.
Change-Id: I9e001b00b5dfe132a6b7bcfdcacd3143fb24f65c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156121
Reviewed-by: Jaime Wren <jwren@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
2020-07-29 17:14:44 +00:00
pq
e2f0cbc4d6
bulk fix for avoid_return_types_on_setters
...
Change-Id: I29465e1a33be384948015682725b3e8f8db99bb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-29 16:03:16 +00:00
pq
1324146fb4
bulk fix for avoid_redundant_argument_values
...
Change-Id: Id7dacf56d72acecfbd0f862585e68d93f2c22d55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-29 15:11:13 +00:00
pq
89504b4e84
bulk fix for avoid_empty_else
...
Change-Id: I5ec1f4c1223aba42e972b78a3c31cc7c2f71c23e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-29 00:43:31 +00:00
pq
1a28fb28c8
bulk fix for avoid_annotating_with_dynamic
...
Change-Id: I29815825e65f51f3db8ec2320412f9926abd0a92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-28 22:10:55 +00:00
Konstantin Shcheglov
78bcab9428
Fix for NPE when REMOVE_UNUSED_PARAMETER in invalid code.
...
R=brianwilkerson@google.com
Change-Id: Ida985d86e062d6c62efa2ae8a394f75a239644e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156068
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-28 21:24:06 +00:00
pq
03e4737f31
bulk fix for prefer_contains
...
Change-Id: Ifb45c1d9dbb19ca7ac6ba20ce9da1b7712827d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-28 18:24:26 +00:00
pq
fbe33e8123
avoid_init_to_null bulk fix
...
Change-Id: I2c40b1028382d1818dc13a3f80e94184738016c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156069
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-28 16:03:48 +00:00
Brian Wilkerson
68472f2767
Fix add_missing_required_argument to handle named constructors
...
Change-Id: I00b5c22c36881f2643867da1fafb5ff2cf59c931
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-27 22:27:51 +00:00
Konstantin Shcheglov
8de8a1c226
Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
...
They are all errors now.
Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-27 16:44:15 +00:00
Konstantin Shcheglov
ba92b78acd
Move errors from StaticWarningCode to CompileTimeErrorCode.
...
Bug: https://github.com/dart-lang/sdk/issues/42821
Change-Id: I153c48d7a2e4a02026928e6203aacf8f2dc029ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-26 04:19:25 +00:00
Brian Wilkerson
9e1b6030d2
Fix a type cast exception in the create-constructor fix (issue 42830)
...
Change-Id: I47b11000c2c4ec96856a58d43f9b7b6493cc7908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155825
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-24 23:36:23 +00:00
pq
8d8dbfcea2
Add @override bulk-fix
...
Change-Id: I45da6351fc705ca2d7d6e20b5ef43a6ca9173289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155828
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 21:54:41 +00:00
pq
8c1829e110
bulk fix protocol wiring
...
Change-Id: If9827b8765eb17c728113aaf23a26df5c8a05738
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 16:56:34 +00:00
Danny Tuppeny
afee49e7c1
Add a default clientID when running in LSP mode
...
Change-Id: Ice200282cb84e512562628fd534177ebbd1c13de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 15:07:44 +00:00
Konstantin Shcheglov
4d3ec06277
Add more data and performance operations for Cider.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: If2ad5135a8de977f92300e6c2480891ab02c6458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155721
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 00:25:56 +00:00
Konstantin Shcheglov
cc519b9a03
Test that during partial resolution for Cider we don't resolve some nodes.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I7212016394b7e2027b47ba8dec47b94961dccb5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155546
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2020-07-23 16:21:00 +00:00
Konstantin Shcheglov
dfe1d9b682
Disable OverrideContributor for Cider.
...
We see that it is slow, about 600ms, at least in some cases.
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I5c1170a84c06aa9c28000c03fbc138d2909e7f2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155504
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 22:23:19 +00:00
pq
aea99b2f5c
scope debug property assist to Diagnosticables
...
Fixes: https://github.com/dart-lang/sdk/issues/42783
Change-Id: Ied9b0fa04e0f99b4d5b4604c72696b5cfaec737d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 22:18:24 +00:00
Konstantin Shcheglov
6f8ce20c99
Move asInstanceOf(ClassElement) to DartType.
...
This follows to the change to the specification.
https://github.com/dart-lang/language/pull/1106
R=brianwilkerson@google.com
Change-Id: I6575f201161c454de98e9bcbec74b9974d91d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155242
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 01:22:05 +00:00
Brian Wilkerson
79a2aca554
Generalize data-driven changes to support references to named parameters
...
Change-Id: I75162225f88c2a50b4f5e0ca6601c685be6436b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-21 23:31:55 +00:00
Konstantin Shcheglov
284ba97259
Call getFileContext() once for Cider completion.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: If6332ad5a7a3153e7bc67376294df9bbb2468ce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2020-07-21 17:07:02 +00:00
Danny Tuppeny
0aed132f4d
Don't send analysis errors for ignored files
...
Bug: https://github.com/dart-lang/sdk/issues/36064
Change-Id: Ic12aa70d7ca287c4a8db7915c10dde5da2e2137c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155130
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-21 15:44:28 +00:00
Brian Wilkerson
ac3e85a69d
Fix a type in a class name
...
Change-Id: I59bcdb777a5cad69bcbe32919453c1bfa4a52caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 13:49:27 +00:00
Brian Wilkerson
511ee086c0
Move more implemenation into subclasses of Change and breakout validate and apply phases
...
Change-Id: I6ef5a3afd7cf9902e400c707f3ad5d858b7e9bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155067
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 13:49:19 +00:00
Konstantin Shcheglov
86ec742832
Switch to new Scope(s).
...
No much changes to resolution itself, only to the way how we create
scopes. But we still use `lookupIdentifier` that is basically the old
approach to resolution.
This also moves the fix of https://github.com/dart-lang/sdk/issues/42620
to TypeNameResolver.
I will continue improving in following CLs.
Change-Id: I89bae5afe0a7978aba9fe9bf7c8bf08fb59b1440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 01:37:34 +00:00
Brian Wilkerson
3adf588153
Hovers stop claiming that classes contain themselves (issue 40056)
...
Change-Id: I27b3f63e7795c287f43fd88b730c8792c9a8f768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-20 20:36:41 +00:00
Brian Wilkerson
802647fa26
Add a processor that can apply multiple fixes across multiple files
...
Change-Id: I2df6a473cd83d978e678ebabb88d5bfbcea3653f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-20 17:59:41 +00:00
Brian Wilkerson
bfc4a22869
Add initial support for data-driven fixes
...
Change-Id: I7d63438dde4c0904bf6e04ac9feb00aac72a6066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-20 16:23:27 +00:00
Danny Tuppeny
0de2455c02
Fix modifications stamps for modified files
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/2286#issuecomment-658597532
Change-Id: Ibb49a3b244ca40da5018fd705adffdbe6e0ce880
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-20 14:46:07 +00:00
Danny Tuppeny
2e6dd67859
Prevent NPE when trying to compute AddDiagnosticPropertyReference assist inside a mixin
...
Bug: https://github.com/dart-lang/sdk/issues/42749
Change-Id: I2772f0c0f4f21409730713c1ed8a871725080a2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-20 14:15:34 +00:00
Brian Wilkerson
e2f14603db
Add a new replace-cascade-with-dot fix
...
Change-Id: I1e3416e8d92c4c63f26e5627c68ed587ab260cc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154921
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-20 05:16:53 +00:00
Brian Wilkerson
7032b2b1d7
Fix an npe in assign-to-local-variable assist (issue 42747)
...
Change-Id: Ib9c4a683a15b83d2d8e8fe00565d6457cea36c1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154845
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 21:58:23 +00:00
Brian Wilkerson
174759cfbd
Add a way to get all of the lint codes used by a rule
...
Several of the lint rules have been producing diagnostics with more than
one lint code, but the code that deserializes diagnostics has only been
able to use one of the codes. That potentially leads to errors, though I
suspect the bug has been invisible because we serialize and deserialize
the messages. Nevertheless, it seems like we ought to do this correctly
and that it will eventually lead to a visible bug.
Change-Id: I41faaa45df63cb3c74042661e1c89e3fde3d72d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154843
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-17 18:39:37 +00:00
Brian Wilkerson
e0cfdc0d62
Deprecate the class DartChangeBuilder and update all references to it in the analyzer packages
...
Change-Id: I6c2692ed5ece57d28f70482877933564d443cfa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154753
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-17 00:11:14 +00:00
pq
4aa16acb30
bulk fixes impl
...
A basic implementation. Next up a dedicated `BulkFixesProcessor`.
Change-Id: I6d11888b8df66cd58a5a59d2e2ddb53e51d08872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-15 21:59:50 +00:00
Danny Tuppeny
8a4f583571
Support Deprecated + Unnecessary diagnostic tags for LSP
...
Change-Id: I3915c2658e090caae40d126f6faff38620518950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-15 18:13:24 +00:00
Danny Tuppeny
cf89c2e2cb
Add support for LSP CompletionItemTags
...
Change-Id: I40b30e8e442913d20bccd53d4b96c2b60fb81190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154467
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-15 17:12:14 +00:00
Konstantin Shcheglov
c3655ed435
Remove FolderBasedDartSdk.defaultSdkDirectory() and getSdkProperty().
...
It is up to the higher level clients to decide how to find SDK.
It is not API, and is not referenced internally, so we can land it
without going through breaking changes.
Change-Id: Id428519fa9bb3c38368f095c0f358e07f65c45b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-14 18:09:30 +00:00
Brian Wilkerson
9bb4fb680e
Update the wrap-in-padding fix to not add the keyword const when in a constant context
...
Change-Id: Icc9a8ed08b1294757df336d0d7169ac8b75c95c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154287
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-14 16:34:49 +00:00