Commit Graph

501 Commits

Author SHA1 Message Date
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
Paul Berry 4d4353ded9 Move navigation_dart.dart from analysis_server to analyzer_plugin.
This will allow it to be used by the nnbd_migration package.

Change-Id: Ia628630cf156af7bbfdbe2e104254cf5a609ae91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144467
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-04-23 12:35:39 +00:00
Danny Tuppeny 715361eef2 Change format of IDs for fixes and attach them to generated changes
Having IDs to the change allows them to be key-bound in VS Code (see https://github.com/Dart-Code/Dart-Code/issues/2169).

Changing for format is to make them better match the existing IDs for assists (these will need to be pre-loaded into VS Code to allow users to see them to aid keybinding).

Change-Id: Iedcfaaf9a29d5e8575f1b8394e3db0ff19360872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143588
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-16 17:35:24 +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 c853f70fea Follow up on recent completion improvement in https://dart-review.googlesource.com/c/sdk/+/142545 to add a test in optype_test.dart
Change-Id: I72ad4a656e332facea7b396604aff765475ad122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142706
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-07 20:56:16 +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
Brian Wilkerson 1e93347fc2 Clean up OpTypeTest
This merges the 3 concrete classes into a single class. We were not
really testing Dart 1 behavior, and the extension methods experiment is
enabled by default.

I also renamed several of the tests to conform more closely to the
convention we use.

I did not alter the bodies of any of the tests, so we're testing exactly
the same things after this CL as before.

In future CLs, as I add more information to OpType (for the new relevance
computations), I plan to subdivide the tests based on the type of the
AST node being tested, which will split up the tests and allow for shorter
test names.

Change-Id: I717c5697817d9f96d050318f2f39da85dff23422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142203
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-02 18:28:29 +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
Brian Wilkerson 127d84aa56 Update relevance computations in LocalReferenceContributor
Change-Id: I19baafc28488304d781757c2a2648ec3d3781d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141361
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-27 18:33:29 +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
Brian Wilkerson 050c7e1ac7 Sort files in analysis_server_client and analyzer_plugin and add tests to keep them that way
I didn't update the generators to generate sorted output, I just
whitelisted those files for now.

Change-Id: Ia1d233ee978691f15bce06b2556aa3371c54183f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-27 13:27:17 +00:00
Brian Wilkerson 7d66feb5ff Compute new relevance in LocalConstructorContributor
Change-Id: Ife24a24829fae36b1caef5ab0a55e4c210a063a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141201
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-26 21:50:29 +00:00
Brian Wilkerson d194838578 Add new relevance scores to LibraryElementSuggestionBuilder, which covers both LibraryMemberContributor and CombinatorContributor
This should have tests, but I (or someone else) need to do some data
mining to figure out the correct relevance values and hence the correct
ordering to test for.

Change-Id: I7782d7b7e13ff38a785c445cd0d6fc82a388a6aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141000
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-25 22:49:26 +00:00
Brian Wilkerson df5e6c8e5f Compute new relevances in LibraryPrefixConstributor
Once again, test suggestions are welcome.

Change-Id: I470825a0ef51f555977bdc86192cc38bd718519a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140943
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-25 21:01:16 +00:00
Brian Wilkerson 9e4eb054a4 Add new relevance scores for NamedConstructorContributor
Change-Id: I6e5fd10edf74b44afb766acd675dffd5ef0cb25f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140906
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-25 17:47:42 +00:00
Brian Wilkerson ef56e3a3fc Update relevance of labels
Change-Id: Id862fa2da7969a9dcdb1854f6ffe38a4c122a024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140778
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-24 22:46:07 +00:00
Brian Wilkerson 7e0190a6d7 Add new relevance values for field formal parameter suggestions
Also updated a comment that I missed from the last CL.

Change-Id: Ibfcce19998532c672b9990308cd7b03fd42d14cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140772
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-24 20:46:27 +00:00
Brian Wilkerson 2d0fed35bb Update the ArgListContributor to have new relevance scores
This also includes a new metric computation showing how often function
typed parameters have closures as arguments.

Change-Id: I8999cc3935bcc7514ebba90a8a4d246b2f236c42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140702
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-03-24 17:00:55 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Brian Wilkerson a5c2d2aa71 Add new relevance support to the OverrideContributor
I couldn't think of any useful features to use when ranking overrides. I
briefly considered `deprecated`, but even deprecated members might need
to be overridden until all implementation of the member can be deleted.

Change-Id: I994d4177b1111ebdf44a223f975422779c5a8ae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140005
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 22:48:39 +00:00
Brian Wilkerson 2a2855c781 Perform new relevance computations for extension members
Sorry for the size of the change.

This started out looking like a fairly simple task of repeating the work
done for type mambers, but it was too similar so I ended up doing some
refactoring in order to share the code.

Along the way I realized that we didn't yet have a feature for demoting
deprecated members, so I added it.

Then I discovered some more places where the old and new logic were
getting intertwined, so I straightened that out as well.

Change-Id: Ic24babd30bbbeeae9709a8019642e497a2ebb65d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139949
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 13:34:19 +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
Konstantin Shcheglov a7a2e7d4b1 Use parseString() API instead of internal Parser.
R=brianwilkerson@google.com

Change-Id: I5ded2637e084acccd0e6e646d4675aa929c9b6d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-25 17:18:31 +00:00
Paul Berry b0b06bff31 Revert "Issue 37487. Add CompilationUnit.languageVersion override."
Reason for revert: it was a breaking change to the analyzer public API.

There were two breakages:

- A @required `languageVersion` parameter was added to
  AstFactory.compilationUnit, which is part of the officially
  supported analyzer public API.

- A @required `languageVersion` parameter was added to the Parser
  constructor, which is not part of the officially supported analyzer
  public API, but is part of its de facto public API due to the fact
  that it is used by dart_style.

This reverts commit ce26dfda7d.

Change-Id: I507103ea6f6ffabf915d6f56e9f24454725c3930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136851
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-25 04:39:10 +00:00
Konstantin Shcheglov ce26dfda7d Issue 37487. Add CompilationUnit.languageVersion override.
Bug: https://github.com/dart-lang/sdk/issues/37487
Change-Id: I57fbcdd6771d9004ba1fc43902c19514dab2a23d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 20:19:43 +00:00
Konstantin Shcheglov 5c332bea91 Stop using 'factory something() => null;' in most cases.
I did not change MockSdk, to avoid conflict with
https://dart-review.googlesource.com/c/sdk/+/135241

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40603
Change-Id: I9f0af20f5914b5ac1aefee02aa8052db269529b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135532
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 22:58:57 +00:00
Konstantin Shcheglov abf7d1fc08 Issue 40572. Pass Packages to AnalysisDriver.
Just as SourceFactory is given to AnalysisDriver, so should be Packages.
Understanding --packages and discovery in out of scope.

Bug: https://github.com/dart-lang/sdk/issues/40572
Change-Id: Id120fba0f23a4423797fa9976c4cda5ed54dad53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135188
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-11 00:57:45 +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 9609975262 Update generators to not produce type annotations for variable declarations
Change-Id: Ia19c94b430192c606d12449011503d5ca8172feb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-25 16:31:15 +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 7070347bbb Generate single quoted strings where possible
Change-Id: I27546bbfb85f78021e515d00c2531b83b47fc71f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-20 21:52:34 +00:00
Brian Wilkerson 77e3fd76f1 Enable prefer_if_null_operators and unrelated_type_equality_checks in analyzer_plugin
Change-Id: Iebc155c870534eb6ea2dbd6004d9101a025331c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132456
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 22:08:29 +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
Konstantin Shcheglov c3a2ed9555 Fix failing tests on unittest-asserts-release-win after analyzer Packages change.
Change-Id: Iec83b5d02d10e3b93f2e1e734bd155189f9ef2d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131780
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 03:10:24 +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
Simon Binder b9c5798b3d Support latest analyzer in analyzer_plugin
I've raised the upper constraint for the analyzer to `<0.40.0` so that `0.39.1` can be supported. The latest `build_resolvers` package requires analyzer `^0.39.0`, it would be nice to use those packages together.

Closes https://github.com/dart-lang/sdk/pull/39417
https://github.com/dart-lang/sdk/pull/39417

GitOrigin-RevId: cba1d31a125aed413b290adee74b895dca4e8f25
Change-Id: Icf1107c9a1599074e76b9f4d636841c2a1744679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125491
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-13 22:09:34 +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