Brian Wilkerson
eb1ce5d640
Remove some unnecessary null checks
...
These were found using the unnecessary-null-checks lint. It has a bug
that prevents us from enabling it at the moment, but we should consider
enabling it once the bug has been fixed.
Change-Id: Ice250b5a6a8723c5f08dec5b07ae738e17c842cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196550
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-24 18:22:43 +00:00
Danny Tuppeny
a808d5ca20
[analyzer] Update LSP fix-all tests based on new server implementation
...
Change-Id: Iccc71d67c77eb2a372293e746ca12984f67a0579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-21 19:48:00 +00:00
Danny Tuppeny
1b6399759a
[analyzer] Migrate remaining LSP tests to null-safe
...
Change-Id: I7a2befd9d46b93ebeb84c40f33121f077f3d6f1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-21 16:41:50 +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
Danny Tuppeny
8f9cdb3b2f
[analyzer] Remove LSP fix-all-in-file functionality
...
To be replaced by new functionality that works with LSP + original protocol.
Change-Id: I59627e2c4e99b0a6aa0eb850168c870e5390e03b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-22 19:53:39 +00:00
pq
4302f058dd
disable legacy fix-all fix creation
...
Tests to be re-enabled when we wire-up `FixInFileProcessor`. (Or maybe we want a different approach to testing fix all fixes entirely? TBD.)
See: https://github.com/dart-lang/sdk/issues/45026
Change-Id: I66f83d06801a71143dcc770cc38d9e2f86782264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185180
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-16 20:50:20 +00:00
Danny Tuppeny
c8c49c7cc8
[analyzer] Handle creating new files from code actions
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3141 .
Change-Id: I44d7f20962512988ff1d54c7b38b6a144f973a58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-16 18:54:39 +00:00
pq
2d27b34b06
appliedTogetherMessages for fixable in file fixes
...
Change-Id: I674f0e79c5d7ce5c44bcbddff8e6866106e860c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-02-12 17:10:23 +00:00
Danny Tuppeny
235292605e
[analyzer] Filter code actions returned from LSP server based on params.context.only
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/2854 .
Change-Id: If6036a4361b68ae2daa66b99755dfa9b9a8adcfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-11 18:16:20 +00:00
Danny Tuppeny
732305f11e
[Analyzer] Don't show duplicate LSP code actions on same line
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/2960 .
Change-Id: I63361728e80c7db843db9e2b31e76eae78f85400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172562
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-19 10:55:33 +00:00
Danny Tuppeny
3bf25c6c40
[Analyzer] Support fix-all-for-file in LSP code fixes
...
Change-Id: Ic3628ee80c409feab178e237bccc5054501549e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172400
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-19 10:44:13 +00:00
Konstantin Shcheglov
7ec28c3f08
Enforce await_only_futures and fix violations.
...
R=brianwilkerson@google.com
Change-Id: Icfc093d46562ddc7084151e76f495cc1462bb900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164257
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-24 14:28:00 +00:00
Danny Tuppeny
24eff206ee
[Analyzer] Don't return LSP code fixes for files not being analyzed
...
Bug: https://github.com/dart-lang/sdk/issues/43521
Change-Id: I6853bec8d73997f3b830737010c31da69d826d3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164089
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-09-23 14:00:39 +00:00
Danny Tuppeny
e8e366714c
Rename "Sort Directives" as "Organize Imports" in the quick-fix
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/2552 .
Change-Id: I5591b3fa7b0e2c03e104b16f878689cf2e8caa4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151514
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Jaime Wren <jwren@google.com >
2020-06-29 16:38:13 +00:00
Danny Tuppeny
25cf204dd2
Prevent duplicate code actions for lines with multiple similar errors
...
Change-Id: If1a50f3c651efec9ba68fc7be5e50700cfcdb20b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151234
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-15 18:09:02 +00:00
Danny Tuppeny
4932348ff3
Expose fix/assist IDs in LSP code actions
...
Change-Id: Ic75fd362f9feada81834a7d36419c27cf316f18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143814
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <danny@tuppeny.com >
2020-04-20 14:57:26 +00:00
Brian Wilkerson
58a9c22f80
Add return types to more methods in analysis_server
...
Change-Id: I65bed353bcff4f991faf8c3bdde979789a8d962b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-30 21:43:34 +00:00
Danny Tuppeny
f7e288e3ad
Return empty responses instead of errors for non-Dart files in LSP server
...
Previously we could return "invalid path" responses for any non-Dart files. This allows clients to send requests for other files and just successful (though empty) responses.
Change-Id: I192e83ac2ebd2124c03c22e3e048a066cfd33f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-05-13 09:04:36 +00:00
Danny Tuppeny
f5c69070af
Minor LSP refactors/tidy up
...
Change-Id: I7402d9493c58b1e020655a3b6332edbb5425fc22
Reviewed-on: https://dart-review.googlesource.com/c/89360
Commit-Queue: Danny Tuppeny <dantup@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-14 17:30:45 +00:00
Danny Tuppeny
e3991780a5
Add code fixes to LSP code actions
...
Change-Id: I5ec0932945cc6215cb671f89e8bed21609894ba2
Reviewed-on: https://dart-review.googlesource.com/c/87066
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-12-12 15:52:45 +00:00