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
c2d28d1569
Rename Null Safety tests.
...
R=brianwilkerson@google.com
Change-Id: I9276244cab52cb5c0f2687052f2a3df9a9fd48b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 00:26:08 +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
58b6f40c73
Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
...
Initial: https://dart-review.googlesource.com/c/sdk/+/155500
Reverted: https://dart-review.googlesource.com/c/sdk/+/155540
Bug: https://github.com/dart-lang/sdk/issues/42797
Change-Id: I5f0f1df594ac678718f347ee80b1764f971e42e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 00:01:12 +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
Brian Wilkerson
052f100a95
Fix newly reported hints in analysis_server
...
Change-Id: Ie39a0f1f67019282c9d2bb4548ac553fa7061a65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155131
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 17:01:42 +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
Konstantin Shcheglov
ea7a92845c
Fix NPE for CREATE_FUNCTION when IndexExpression argument.
...
Change-Id: I539908a5033aa0f84adcce5ae0be4ea6713ff75c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-19 15:40:19 +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
b6773035ba
Fix for Cider completion in libraries with parts.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I834d27cad96092d32d7c1bacb71fc4584ba3503d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-14 23:58:03 +00:00
Danny Tuppeny
e7f861023c
Add dart.lineLength setting to the LSP docs
...
Change-Id: Ic517979497a0755683a8b5f2335ee75d103b5220
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154327
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-14 18:13:30 +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
Konstantin Shcheglov
69d11907ec
Support for data attachments to OperationPerformance.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I674f2eaa271d9c2bbf9a82831bfeaff1ca765264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154286
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-13 22:34:19 +00:00
Danny Tuppeny
ba459f96cf
Allow dart.lineLength to control formatting for LSP
...
Noted at https://github.com/Dart-Code/Dart-Code/issues/2286#issuecomment-655762024 .
Change-Id: If45bede84a0a4414a16d1809a1aa0f81d18cebfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-07-13 17:09:59 +00:00
Brian Wilkerson
da9697feb9
Fix the update-sdk-constraints fix
...
The bug was reported on https://github.com/Dart-Code/Dart-Code/issues/2629 .
The fix is not ideal, but the best I know how to do quickly. I think
that a better fix would be to not have a `DartChangeBuilder` and to have
`ChangeBuilder` be able to build file builders for both Dart and non-Dart
files. The reason I haven't done that yet is that I want to spend some
time thinking about the best API for that change.
Change-Id: Idbc55e347f724cd1102b6032c2f7239cd9ee7fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-13 16:18:19 +00:00
Mike Fairhurst
0506475654
[analysis_server] Remove added space.
...
Change-Id: I7a5c8fdfc318359904b9c4befe07ff0be186b446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154125
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-11 04:17:32 +00:00
Brian Wilkerson
082a6e03bd
Use element kind to boost the relevance of available declarations
...
This doesn't significantly improve the overall scores, but it does cause
the element kind to be used for available declarations, which means that
constructors are suggested before classes.
Change-Id: I75e7bb13bd867b9209a43c4d737c5079c42eb25a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154080
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-10 20:08:36 +00:00
Mike Fairhurst
dfd71a7e3d
[analysis_server] Report plugin startup failures to instrumentation
...
And don't report an issue stopping a plugin that crashed.
Change-Id: Ic079748e578a0a5331165bd60a3ed0e6cf44e3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2020-07-10 20:04:26 +00:00
Konstantin Shcheglov
707c6404f9
Use not deprecated analysis_options_provider library ins analysis server.
...
R=brianwilkerson@google.com
Change-Id: I009c28e6e91bec4c4d75fb9452b3794635269b6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-10 19:13:46 +00:00
Konstantin Shcheglov
90ce990409
Simplify Flutter support to a single instance.
...
Change-Id: I90813c4e01694510971c4ce9cf96a4a3380a2923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153952
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-10 17:21:24 +00:00
Konstantin Shcheglov
adb317e5b0
Use InterfaceType.asInstanceOf() in AddDiagnosticPropertyReference.
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: Ic40accfcdb645dc0260965efaec1701d3e5548ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153950
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-10 15:17:32 +00:00
pq
3d5df93fb1
bulk fix protocol
...
Change-Id: Id8505d5ad6f0f3d1c5289ab12d4932c6174f72e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-07-10 14:20:07 +00:00