Commit Graph

490 Commits

Author SHA1 Message Date
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
Brian Wilkerson 7ed7bffd2b Fix some hints caused by previous CL and add some failing tests
Change-Id: I1e0c1fe0561525c230aed4e4009f49025c4d3cfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131260
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 05:27:23 +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
Konstantin Shcheglov e85e203e73 Deprecate DartType.name
Change-Id: If3a967bba976aa78493764513edbb3d406b08d27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130625
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-08 07:00:59 +00:00
Konstantin Shcheglov 39f14a000e Rewrite most getDisplayString() to ElementDisplayStringBuilder.
R=brianwilkerson@google.com

Change-Id: I500d0045873a12d550d9ffe302e066a63ba56660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-06 16:43:40 +00:00
Brian Wilkerson e5705943d8 Enable prefer_conditional_assignment in several packages
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.

Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-06 05:19:19 +00:00
Brian Wilkerson fbadd6a832 Enable prefer_equal_for_default_value in several packages
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.

Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-05 20:59:19 +00:00
Konstantin Shcheglov 850ca2d410 Add Element.getDisplayString(withNullability), use it in analyzer.
R=brianwilkerson@google.com

Change-Id: Ic4924e19612f2a7713f9a3f2059a880ebff9d2db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-01 19:01:14 +00:00
Brian Wilkerson 7d41ae7d15 Enable unnecessary_this in several packages
Change-Id: I743066d66dbf1dff984e8f8bf5b7a472c9bc7ff7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 20:43:16 +00:00
Brian Wilkerson e2431d1452 Update the generators to not generate unnecessary uses of "this"
Change-Id: I20d15e3b0f8046065906d96860073ad4cf353868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129815
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 16:23:06 +00:00