Commit Graph

263 Commits

Author SHA1 Message Date
Lasse Reichstein Holst Nielsen 92e52a1874 Remove direct dependencies on package:charcode from SDK.
Change-Id: I9ef36e8a6890a70baac6c18f0be2252dcf5453df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163941
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-20 13:07:53 +00:00
Konstantin Shcheglov aad1a677c0 Deprecate GenericTypeAliasElement
See also https://dart-review.googlesource.com/c/sdk/+/166680

Change-Id: I6018f3bf5796dcc8ab059aab5b29d01e7336581b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167727
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-15 16:03:26 +00:00
Brian Wilkerson 1fcb032798 Do not generate void when overriding a setter
Bug: https://github.com/dart-lang/sdk/issues/43767
Change-Id: I373793360ffc58f28cb7a58b1b16c360b560ba51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167363
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-13 16:30:08 +00:00
Mike Fairhurst e4f20f647e [analyzer_plugin] Remove unnecessary dart:async import
Change-Id: I759d4f9b05a21062550f9cbbc2fe56a2f19dfaf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164621
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-28 21:07:08 +00:00
Brian Wilkerson fdf4a1cc47 Fix the production of overrides under null safety
Bug: https://github.com/dart-lang/sdk/issues/43535
Change-Id: I9386d3abed83095e2363ba9b52c111dc93356914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164260
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-23 22:42:59 +00:00
Brian Wilkerson 69de8fd3d4 Make it possible to write imported names in data-driven fixes
Change-Id: Icc1843a767261180df2b07205faf3f960adf0826
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164200
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 18:46:09 +00:00
Danny Tuppeny c0c5a7404c [Analyzer] Make newlines in fixes like CreateMissingOverrides consistent on Windows
See https://github.com/Dart-Code/Dart-Code/issues/2766.

Change-Id: Ib1d5f06a9a3667c704e9656b233cc2cce01fa3d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163206
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-17 16:01:10 +00:00
Danny Tuppeny 31cc6df4fe [Analyzer] Compute code locations for LSP definitions
Change-Id: Id52fefae11b0d779b860cb44e33bc36cc12e55bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161168
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 20:51:27 +00:00
Mike Fairhurst 334d368146 [analyzer_plugin] Remove unused dart:async imports
Change-Id: I079d5f7c1f6c36d4e76ecd41b5d22e4199c1304c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161464
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 18:09:52 +00:00
Brian Wilkerson 61c8053730 Fix computation of OpType in an empty return statement with a semicolon
Change-Id: Id28f0ce01bd4ba2a5185b4d3f407409a6b724a1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159969
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 23:30:27 +00:00
Brian Wilkerson 680f3b51ca Suggest named parameter names in a super constructor invocation
Change-Id: Ibe095cab1473aefd3a1067bb0264a115f44c05d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159964
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 20:42:07 +00:00
Konstantin Shcheglov cf4d41074e Fix crash when working with directives with invalid URIs.
R=brianwilkerson@google.com

Change-Id: Id8bd5c49269c58404b4a4d3182b77a37fb494c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-22 18:37:51 +00:00
Brian Wilkerson 90b2e5f576 Enhance DartEditBuilder.writeParameter to support the covariant and required keywords
Change-Id: I625196ff5786d9a6029db92809487d79e0e8d710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159385
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-20 14:03:18 +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 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
Brian Wilkerson cbe22f1533 Merge the functionality of DartChangeBuilder into ChangeBuilder
This introduces the new API. When we're happy with this I'll mark the
old APIs as deprecated and fix up the nearly 900 places impacted by the
change.

Change-Id: Ie88e354d9111339dc79448139bd64246cf06e0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 17:44:34 +00:00
Brian Wilkerson d0e78f8a77 Fix the edit groups created by create_missing_overrides (issue 42468)
Change-Id: I53e5f44af3583549f277f1d7acbe1f725f7a6ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-24 22:39:18 +00:00
Jaime Wren 1e0611cfac Refactor the LocalConstructorContributor into the LocalReferenceContributor.
local_declaration_visitor.dart was updated to better implement ConstructorDeclarations

This adds the API of _recordCompletionElement() and _elementAlreadyInCompletionSet() to local_reference_contributor.dart, if this API looks good and lands, I will use it in the rest of the contributor to fix other known shadowing bugs.

local_constructor_contributor_test.dart was removed (a large copied & pasted body of tests not providing value) and tests were added at the beginning of local_reference_contributor_test.dart.  Tests in this file were also updated accordingly.

The change of the testCommentSnippets025 test in completion_test.dart is due to the framework not supporting (in a more robust way) the allowance of both a class and an implicit constructor

The addition of the testCommentSnippets045 test in completion_test.dart is to show that constructor invocations don't need the new keyword.

Change-Id: Ic4a52e3cb94320a92f24b1c743dd61e18c6c7b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-05 16:15:04 +00:00
Jaime Wren 77d2a59d8e Add declaredConstructor() to the LocalDeclarationVisitor and mark all declared*() members as concrete with empty bodies. Subclasses are updated in this change as well.
Change-Id: I458968049781830af83d09512a6a1dd75b573070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149391
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-29 15:23:46 +00:00
Brian Wilkerson b7364da5fd Fix the computation of completion location in OpType
There was a bug earlier in which we were attempting to use a relevance
table (MethodInvocation_arguments) that was not generated. I thought
the bug was that the table wasn't being generated, so I attempted to
generate the table (in relevance_table_generator). But the table can't
be generated and the real bug was that the wrong contextLocation was
being generated when computing the OpType. So I backed out the earlier
change and updated the generation to generate the right location.

Change-Id: Ifbd2c6c3e11e1e98887108be7eb6d90e90452446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149381
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-28 21:23:01 +00:00
Brian Wilkerson 3fb5f27d05 Extract and enhance the CREATE_CLASS fix
The enhancement is that we can now create a const constructor if the
class to be created is being used as an annotation. We could also do
this if the class were being created from a constructor invocation, but
I didn't do that. This also doesn't handle creating a named constructor,
but I don't think it's any worse than before. If you disagree let me
know.

Change-Id: Idcff7bd0ac8def416b141b49b801f6798548405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148885
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-22 18:50:06 +00:00
Brian Wilkerson b560016446 Fix some issues in the new relevance computations
The code to check the element kind was not being used in a few places
because (a) the generator wasn't always generating a table when it
should and (b) the key for the table wasn't always being set when
creating the OpType. Both of these issues have been mostly addressed.

That required re-generating the element kind tables.

There were several places where context type information wasn't being
used when building suggestions. This has been fixed for all the places
I'm currently aware of.

There were a couple of places where the context type wasn't being
computed where it could have been. I have fixed the places I'm aware of.

Context types were not being computed anywhere because of a bug that
has now been fixed.

There is now one place that computes and caches the context type, which
should improve performance slightly.

I also removed some dead code that I discovered in the process of making
the other changes and cleaned up a couple of places in the code that
were suboptimal.

Change-Id: Ieae8dcc71b986841be3078d6e0b3a653c35384b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148237
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-16 17:15:33 +00:00
Konstantin Shcheglov 4e520824f5 Deprecated DartType.isObject
R=brianwilkerson@google.com

Change-Id: If588b23668764b07c99e327281bfeb11c8e31367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-11 16:14:37 +00:00
Jaime Wren 38c0fb78b6 Completion bug fix - extended types will now be completable in extension declarations
Bug: https://github.com/dart-lang/sdk/issues/41665
Change-Id: I5e89babc7a52fa833ebd55398fca50b292c710da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-27 19:20:08 +00:00
Brian Wilkerson c980e5d876 Produce a completion location for the argument list in an extension override
Change-Id: I694d77dbba171fb0d4806933ce766c9d411dba21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144664
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-23 19:30:19 +00:00
Brian Wilkerson 84beb4d31b Implement the element kind feature
In addition to implementing the feature, this CL updates one of the
contributors to use the new feature as a way of testing it. I haven't
looked to see whether it impacts the metrics, but I wouldn't expect much
change anyway because of the small number of completions that are likely
to be effected by this change.

It might be interesting to start thinking about ways to measure the
impact of individual features.

Change-Id: Idd0040a774e5fd9a6e3f6c29d0aa7fd762676fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143622
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-04-16 14:33:24 +00:00
Brian Wilkerson 286501b0f1 Compute the completion location while computing the OpType
The completion location will be used later to help compute relevance
based on the element kind.

Change-Id: I3927bb0137340a81fc90efcbc9c3ecb25ad63542
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143240
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-13 17:06:01 +00:00
Jaime Wren eddc9271ab Suggest type names before names in FieldDeclarations, even when they are documented with dartdoc
Similar to https://dart-review.googlesource.com/c/sdk/+/142545

Change-Id: I217a17324bcfd9efb7e9bd1a53332fd06d1dc024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-07 20:53:46 +00:00
Jaime Wren faab097e01 Suggest type names before names in TopLevelVariableDeclarations, even when they are documented with dartdoc.
The test test_TopLevelVariableDeclaration_type_after_comment3, fails without the change to optype.dart, the other tests were added simply to have more coverage.

Change-Id: I11512f1a97e72796b6e0656b7555206640e2a8f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142545
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-07 18:07:16 +00:00
Jaime Wren 25c591e0b0 Additional optype constructor declaration tests as well as a minor bug fix in optype.dart.
This is follow up on https://dart-review.googlesource.com/c/sdk/+/142063

Change-Id: I39dcb9cbecf78e12cc364712345693e153110523
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142088
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-02 06:11:40 +00:00
Jaime Wren 0c8158c3cd Fix missing type name completions in constructor declarations.
There are 34 instances of this in the package collection.

Change-Id: I43856f0e840ca3f76285948363868927b669caf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-01 20:58:28 +00:00
Brian Wilkerson 6f15530536 Enable omit_local_variable_types in analyzer_plugin
Change-Id: I908e15b4820eab0e8375994ce3cebfac332306f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 04:06:49 +00:00
Konstantin Shcheglov b2acb51d30 Fix for completion in formal parameters of GenericFunctionType.
There was crash:

NoSuchMethodError: The getter 'offset' was called on null.
Receiver: null
Tried calling: offset
at Object.noSuchMethod	(dart:core )
at _OpTypeAstVisitor.visitSimpleFormalParameter	(optype.dart:976 )
at _OpTypeAstVisitor.visitFormalParameterList	(optype.dart:631 )
at FormalParameterListImpl.accept	(ast.dart:4479 )
at DartCompletionRequestImpl.opType	(completion_manager.dart:435 )

R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I0b0ef50e925ad48ca293a7a753b332821b503e5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-27 17:02:34 +00:00
Konstantin Shcheglov 7079c49b05 Check for importedLibrary is null in importLibraryElement().
I see it in crashes sometimes.

R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I734d78f0e71c5985c7833fcf6e439fd4c48a5899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139601
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-15 21:22:37 +00:00
Brian Wilkerson 3c50ff1f15 Remove some unused members from OpType
Change-Id: I79788bed588234a85080e840fba578e5a51d6928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139304
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-12 18:51:46 +00:00
Brian Wilkerson 027f9588e1 Fix replace_null_with_closure when the parameter type has no parameter names (issue 40578)
Change-Id: Ie85294e1925a1d3880416ef4ceed86052e1534e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-03 18:51:23 +00:00
Brian Wilkerson 8d6e4e46b1 Add an assist to shadow a field when a local variable might be promotable
This is a fairly limited initial version of the assist. In addition to
implementation comments I'm interested in knowing whether there is value
in committing it as-is or whether it should be enhanced first.

Change-Id: Ia28328e1e5a759c0cec3936b334f719927f46dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 19:43:32 +00:00
Konstantin Shcheglov 738ad286d7 Use DartType.getDisplayString() instead of toString().
Change-Id: I97059ac709bc46347f97fd951d839985ab12d62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:33:21 +00:00
Brian Wilkerson 7494f58032 Enable always_declare_return_types in analyzer_plugin
Change-Id: I972f0e2569de64397828d887b1fb37fcf57e006f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133408
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-26 23:13:34 +00:00
Brian Wilkerson 1bd047a67a Enable prefer_single_quotes in analyzer_plugin
Change-Id: I9cdda6df810ac20c9737d12951ad53a72e6b4f3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 18:09:03 +00:00
Brian Wilkerson 491201aae6 Enable use_function_type_syntax_for_parameters in analyzer_plugin
Change-Id: I78e70d652a1f4c8539767d65beb9a08882f78e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132455
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 20:12:33 +00:00
Brian Wilkerson f34a25099b Enable slash_for_doc_comments in analyzer_plugin
Change-Id: I9cafff7fcbf6c8930e3ac8ddba05061601aa8223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132452
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 18:17:31 +00:00
pq 819a97a0ef type argument completions for generic method invocations
Fixes: https://github.com/dart-lang/sdk/issues/40190

Change-Id: Ic44dca751e08a7fdd540c96172f07cb8ee1d1850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132382
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-17 21:56:26 +00:00
pq c7745a1a0d contribute local completions for mixin members
Fixes: https://github.com/dart-lang/sdk/issues/39795

Change-Id: I1a186dd63e59463706d18dd484653c0bee70ba90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-16 22:55:53 +00:00
pq 8163dbea4f completions for yield statements
Change-Id: I4ac28ebf4d5b2c49926a31704a81ccf2fd14106d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131718
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-15 00:49:24 +00:00
Brian Wilkerson d1e11f0881 Enable prefer_final_fields in three packages
Other than the updates to analysis options files, these changes are all
from dartfix.

Change-Id: I517b0601e36d5456960d81be9a429cbacf711141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-13 05:32:14 +00:00
Brian Wilkerson ac8a2a657a Enable avoid_init_to_null in analyzer_plugin
All changes other than the analysis options file were made by dartfix.

Change-Id: I4c034327b39f938965c69e6eb504b8dc50267975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-12 22:54:24 +00:00
Brian Wilkerson 32ce9c7872 Enable prefer_collection_literals in three packages
Other than the following changes, all of the changes were made by dartfix:
- the analysis options files
- one line to enable the fix through dartfix (missed in an earlier CL)
- three places where a bug in the fix produced invalid code (issue and fix TBD)

Change-Id: If8660700792561805f4d1c96ccecd81abcebfeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-11 20:39:02 +00:00
pq 697c2e4f08 remove unused local
Change-Id: I0002bfb31b50905d2c4bfc20ddcd956edfa941c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130932
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-10 20:22:02 +00:00
pq 30b5aaa889 fix override change edit for super operators
Currently, wrongly generating:

  @override
  bool operator ==(other) {
    // TODO: implement ==
    return super.==(other);
  }




Change-Id: I99a2584e5e921d0dd5639c45a9ec8fe27f082ccd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131041
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-10 18:55:12 +00:00