Commit Graph

1194 Commits

Author SHA1 Message Date
Brian Wilkerson 4200f6d915 Enhance the replace_with_null_aware fix and apply it in more places
Change-Id: I80945b4814cca0eaeca2129e5365c0d7526a8247
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-06 17:03:35 +00:00
Brian Wilkerson 7bc076c9e0 Fix a bug in data-driven fixes that caused imports to be added multiple times
Change-Id: Idd0dadcaed4b59173573475d5b115e0fc6228184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-04 16:20:07 +00:00
Sam Rawlins 9ec112a509 analyzer: Support declaring and invoking unnamed constructor via 'new'
This adds support for both declaring an unnamed constructor with the
explicit name, "new", and support for invoking an unnamed constructor
as a named constructor named "new".

The parser will report EXPERIMENT_NOT_ENABLED if the experiment is not
enabled, as the parser takes care around the keyword, "new".

Tearoff support will be separate.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Iaf3af333dd22337b560aa7f4e5811a4cb38b2a7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-03 03:06:41 +00:00
Danny Tuppeny 4a714b27d6 Reland "[analyzer] Use "pub outdated" to get version numbers for pubspec completion"
This is a reland of 9cbc497d0a

Original change's description:
> [analyzer] Use "pub outdated" to get version numbers for pubspec completion
>
> Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: I8acd224c7982312c48039a1cb439323e040b3859
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208324
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-02 14:33:09 +00:00
Brian Wilkerson 4911f0968e Revert "[analyzer] Use "pub outdated" to get version numbers for pubspec completion"
This reverts commit 9cbc497d0a.

Reason for revert: Breaks the flutter build

Original change's description:
> [analyzer] Use "pub outdated" to get version numbers for pubspec completion
>
> Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,danny@tuppeny.com

Change-Id: I78f8658385f3175d07bd453af0f110eff04741ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-28 18:33:25 +00:00
Danny Tuppeny 9cbc497d0a [analyzer] Use "pub outdated" to get version numbers for pubspec completion
Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-28 15:26:04 +00:00
Konstantin Shcheglov 1250fa4911 Rename FileResolverTestView.resolvedLibraries
Change-Id: I30431ce52368737c5e0fb3666d30117fb0e77f50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207600
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-21 23:00:08 +00:00
Keerti Parthasarathy 192ece0637 Add support for checking new name validity during rename.
Change-Id: I67a3e1f02517ae20d8faf73c58ead550820dfaee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207563
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-07-20 23:45:51 +00:00
Sam Rawlins b81dedad12 Do not crash when computing assists for 'sync' function
Fixed: 45768
Change-Id: I54be305f91868975643f3d71197a3763cd45493c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-07-20 16:34:50 +00:00
Konstantin Shcheglov 320616c42e Revert "Switch Workspace to Packages."
This reverts commit c7421d3406.

Reason for revert: breaks Cider in google3

Original change's description:
> Switch Workspace to Packages.
>
> PackageMapUriResolver is still based on Map.
>
> Change-Id: If6ed2d3181129a6605f60dddd8de5783fafa09d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206700
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: Icdd360f226ab70df5b19711e49345c4d66f8d8b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-16 17:23:08 +00:00
Konstantin Shcheglov c7421d3406 Switch Workspace to Packages.
PackageMapUriResolver is still based on Map.

Change-Id: If6ed2d3181129a6605f60dddd8de5783fafa09d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-16 16:27:37 +00:00
Brian Wilkerson 9db372e6f4 Make Location.endLine and Location.endColumn optional fields in the protocol
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.

This CL makes those fields optional in order to fix the deserialization
issue.

Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.

We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.

Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-15 17:35:55 +00:00
Sam Rawlins e681abace9 Remove unnecessary imports
TEST=N/A

Change-Id: I7440c1165a7403aad023f002a97c90572cb66c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205820
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-07-15 16:57:21 +00:00
Konstantin Shcheglov 79327c9f05 Make ResolvedUnitResult.content/unit non-nullable.
Change-Id: Ia79567d248f2c91290bfdf8204ea7e9f3dc85fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206668
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-14 02:33:10 +00:00
Konstantin Shcheglov cac96f7f8d Rename AnalysisSession.getXyz2() into getXyz().
Change-Id: Ia76aafc6a1190dcdca026097c364270389f2860a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 22:42:58 +00:00
Konstantin Shcheglov a9618ac795 Make ResolvedLibraryResult.element/units non-nullable.
Change-Id: Ie20c2363b43555573843c038c15c0d55bcf39579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 20:48:37 +00:00
Brian Wilkerson 0cd008082b Remove nested const keywords when adding a const keyword
Change-Id: I44a14360f0d223612d5ba1437546c59286f96096
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-07-10 19:27:00 +00:00
pq edb0220277 quick fix for avoid_unnecessary_containers
Fixes: https://github.com/dart-lang/sdk/issues/45922

Change-Id: Icddecacce88f725bfa72a5b4c0a667250ba268bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-07-09 22:43:20 +00:00
pq 341facafc7 fix for sized_box_for_whitespace
Fixes: https://github.com/dart-lang/sdk/issues/45928

Change-Id: I7755d75267c91f614518e8a47eb1aa12a76628d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206401
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-09 21:56:25 +00:00
pq 3fb1586b28 quick fix for prefer_const_literals_to_create_immutables
see: https://github.com/dart-lang/sdk/issues/45932

Fixes: https://github.com/dart-lang/sdk/issues/45924

Change-Id: I98d89e9f98b72c333f9bb274b84730d68b71e71f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206102
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-09 01:29:20 +00:00
pq 427e51697d quick fix for prefer_void_to_null
Fixes: https://github.com/dart-lang/sdk/issues/45927

Change-Id: Iac9d5427ef89d51d082ea967febe9cb5597d6525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206103
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-09 00:01:44 +00:00
Brian Wilkerson 7aa46618ae Add a fix for prefer_initializing_formals
Fixes: https://github.com/dart-lang/sdk/issues/45925

Change-Id: I8b4aa081cb54de24879a2035a378409a816d0873
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206325
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-07-08 23:47:44 +00:00
Brian Wilkerson a9147cc8b1 Add a resourceProvider getter to ChangeWorkspace
This also cleans up the code that prompted the change to use the new
getter (and removes an unnecessary method).

Change-Id: Ie5763822ac82b8cf935b689b6d19aea3298b54ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-08 18:34:03 +00:00
Parker Lougheed 7e21736935 Introduce a quick fix for prefer_final_parameters
Change-Id: I63bd7b37325a44fbb6066d19ac4e358b675c58e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-08 14:30:24 +00:00
Brian Wilkerson fc22bf9f1f Add the first quick fix for pubspec.yaml files
Change-Id: Ifeb59abe63b063fabc3338493d9ff18c0aa61c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205980
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-07 14:53:01 +00:00
Brian Wilkerson 4961455641 Update create noSuchMethod fix to also add an override annotation
Closes: https://github.com/dart-lang/sdk/issues/46556
Change-Id: I395777947d0dc7f08681f46e3136f56f9ec800a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-02 23:22:05 +00:00
Brian Wilkerson 0acfd2a6a1 Move bulk fix tests, part 3
This is the final CL in this set.

Disturbingly a couple of the bulk fix tests don't appear to have any
non-bulk test equivalents, just some assist tests. I'm assuming for the
time being that they're adequately tested by the assist tests.

Change-Id: I300558b3551061013e4cab8e97489597541d63bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205626
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-01 00:49:56 +00:00
Brian Wilkerson 98b466dd73 Move bulk fix tests, part 2
Change-Id: Id1506161381cc6194f47811fd059d776b2c23fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205383
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-30 15:48:16 +00:00
Brian Wilkerson 47da8db2f6 Add a fix for the use_key_in_widget_constructors lint
Closes: https://github.com/dart-lang/sdk/issues/45931
Change-Id: I9b4b3275cd5d7f5ca7e1849f3ec5951f14be9cd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205040
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 21:07:20 +00:00
Brian Wilkerson aebde75dbf Cleanup invalid declarations of main, part 3
Change-Id: Iba6b4708a66034c9ac56d0b8910aad6d7f86b56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 18:14:21 +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 f5b28a83e8 Fix a bug in both add_missing_enum_case_clauses and add_missing_enum_like_case_clauses
We should rename ClassMemberLocation to reflect the wider usage, but I
thought it would be better to do that in a separate CL.

Closes: https://github.com/dart-lang/sdk/issues/38693
Change-Id: I657f7945022b09eb8deb89d8f2f5d43164fe53cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205061
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 18:04:52 +00:00
Danny Tuppeny 5dbf8992ed [analysis_server] Include file path in generated "part of" statements for unnamed libraries
Fixes https://github.com/Dart-Code/Dart-Code/issues/3268.

Change-Id: Ic681da09d0161e2e432959989db8c8002b1669a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 17:13:41 +00:00
Brian Wilkerson 0fc6f218bb Move bulk fix tests, part 1
Change-Id: I2b05dfbe5d26b9cd5534cc3971c0500ff11dc474
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205065
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:21:42 +00:00
Brian Wilkerson 86e3c1b231 Add a fix for the unnecessary_string_escapes lint
Closes: https://github.com/dart-lang/sdk/issues/45930
Change-Id: I7b50756256867174aa11adf7d29a67d2cb012839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:05:02 +00:00
Brian Wilkerson 10354d0aef Convert several of servers tests to be null safe by default
Sorry for the size of the CL. In reptrospect I should have changed the
defaults in any test class with failing tests and then converted them
one-by-one the way you did in analyzer. I'm happy to do anything I can
to make this easier to review.

Change-Id: I0a729d0d07cc3083a9892cfb1ddc75a06ad8f0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204748
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-24 04:05:39 +00:00
Brian Wilkerson 0e4c640451 Suggest void as a return type in existing generic function types
Change-Id: I88c37e5ce273de2e9598b182fc5fb61066c11740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 14:04:21 +00:00
Brian Wilkerson 56bf5230ca Enhance the AddTypeAnnotation fix to support prefer_typing_uninitialized_variables
When a local variable doesn't have an initializer we now look for
assignments to find a reasonable type. This will not only allow this
lint to be fixed but will increase the number of places the assist is
offered.

Change-Id: Ib278477d277557aff7d2ddbcca3230f2a0a144b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-22 22:50:37 +00:00
Brian Wilkerson e95c0b403a Code complete the type in a DeclaredIdentifier even if the name is already present
Change-Id: Ic48f2213b2e5cf3f13c2b0d881781a5eab0cd965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 21:47:13 +00:00
Brian Wilkerson 9da9768992 Use the context type to determine whether to suggest functions returning void
Change-Id: I78dac1852cb08f01927ef7fc2603d7de0b3dd891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:46:24 +00:00
Brian Wilkerson 2afc8161f4 Add a fix for exhaustive_cases that adds cases for the missing constants
Closes: https://github.com/dart-lang/sdk/issues/45923
Change-Id: I641c016dc73153d521f43c9ce4d333b50b4a702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:17:03 +00:00
Brian Wilkerson 9ecdfcc8f3 Improve the suggested keywords in formal parameters
Change-Id: Iea099dc140865b109309cd932735f2d0a65fcfd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204080
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-18 15:49:31 +00:00
Brian Wilkerson e5735c7409 Fix the import_library tests on Windows
Change-Id: Ibf2b88be11c7a5d53d7c4ee7c997c334621289df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-17 19:20:31 +00:00
Danny Tuppeny 2e411e5957 [analysis_server] Add quick-fixes to ignore lints/hints for line/file
Change-Id: I773704cccffc7a7da169b3d759b80b07267c88ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-17 15:37:11 +00:00
Brian Wilkerson f06f09246e Suggest void in a type declaration list to support function types
Change-Id: I2514cfd80cec6cbec7703009ba5a12df4640c560
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203663
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 00:49:03 +00:00
Brian Wilkerson cbdb20d417 Erase nullability after a null-aware operator when matching extensions
Change-Id: I6852f6acc4fb27bdfa3686b214c7c34d40c18bfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 00:41:09 +00:00
Brian Wilkerson d5d1d6e6f6 Suggest void after equals in typedef
Change-Id: If85a55e15b6a98d754453860bb82d85b6fa613f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-11 17:47:37 +00:00
Brian Wilkerson b11e0de9f7 Suggest extension members inside extensions
Also suggest 'dynamic' after 'as' in a type cast.

Change-Id: I1e9f9f3a894e2c094aa4a6785fcdcfc60fb34260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203289
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-11 13:45:36 +00:00
Brian Wilkerson d84e261527 Suggest methods and functions returning void in more places
Change-Id: Iab95508b8b6e486bc65d8914e3e4b9fe898a0c48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203282
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-10 19:43:23 +00:00
Konstantin Shcheglov fe35fdd2c5 Use newAnalysisOptionsYamlFile() where possible.
Change-Id: I4b550cac941b6686738722cbcd3d04dfaabe5cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-09 23:57:29 +00:00