Commit Graph

3847 Commits

Author SHA1 Message Date
Devon Carew 5871cfb23c [analysis server] remove older analysis server flags
Change-Id: I4384c98a067467def91e2b769d711069ad057a27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170801
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-09 03:54:58 +00:00
Sam Rawlins d8903669be Quick fix: make a parameter nullable
Closes https://github.com/dart-lang/sdk/issues/44098

Change-Id: Ib3bb0b352f33a027c79746418033497aee1d8a7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170763
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-09 01:19:07 +00:00
pq a15b252c28 overlapping fix test
Change-Id: I4621e8e24b8d296875d2033ac21ba8da68fb0387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-05 21:14:31 +00:00
Konstantin Shcheglov 2513d37525 Fix reported void_checks diagnostics.
Change-Id: I49b27cf3aab3606fb5b024cba3ed4b95e9ebe0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 23:50:37 +00:00
Brian Wilkerson 2d4070fa34 Fix a bug when adding a named parameter after removing all existing parameters
Change-Id: Ib43b154fb781ff50d32f4259ef198857835f9135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170404
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 21:02:37 +00:00
Danny Tuppeny 648debb622 [Analyzer] Prevent NPE in Surround With assist
Fixes https://github.com/dart-lang/sdk/issues/42556.

Change-Id: I5d38fcbd7932a43da0ca40140cefdef593d6ea8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-11-04 17:52:17 +00:00
Brian Wilkerson a1977edddb Support a rename-parameter change for data-driven fixes
Change-Id: I9b2d168e3909e7477724a8feb6ae94b69a09950b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170260
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 16:18:47 +00:00
Konstantin Shcheglov d484a6f09f Remove support for experiments in Analysis Server options.
analysis_options.yaml should be used instead.

Change-Id: I02a03667d5de5c9e764e30ff3c77b8df6deaa221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:46:02 +00:00
Brian Wilkerson be5446f700 Improve the location of a couple of diagnostics
Change-Id: I11e935b89d7e2a91a71b2fed162407d6bb2c2367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 20:31:52 +00:00
Sam Rawlins d38b366eb6 Add quick fix to remove unnecessary null-aware assignments
Fixes https://github.com/dart-lang/sdk/issues/41514

Change-Id: I29398feae3ad3a83ced722a876c6f6416ef46da8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169581
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-29 05:06:53 +00:00
Brian Wilkerson 0128ffa6d1 Add most of the remaining parser diagnostics to the data file parser
Change-Id: I5e074fb17c27c298a56569a3535779205085d6ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169540
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-28 22:30:10 +00:00
Konstantin Shcheglov 774e18d14a Issue 43925. Set the enclosing class for completion.
Bug: https://github.com/dart-lang/sdk/issues/43925
Change-Id: Ide3c8ec104fb9eb92b4d15a14c352e8c7abcb82d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2020-10-28 21:56:40 +00:00
Konstantin Shcheglov f8fdb4be05 Remove return type from addSource().
Change-Id: Iab4ecce3cdd6f4b4034cb293f56f0c943d069b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 18:40:50 +00:00
Konstantin Shcheglov 1958d61b02 Issue 43929. Report HintCode.DEPRECATED_MEMBER_USE for Null Safe from Legacy, refactoring.
Bug: https://github.com/dart-lang/sdk/issues/43929
Change-Id: Ib05f2e44f6cac2acfcb8b3708bd88e38df70d6c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169256
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 16:41:20 +00:00
Danny Tuppeny 5851f8bc0c [Analyzer] Add a fix for unnecessary_non_null_assertion
Change-Id: I90f03426d0f0e823a89dcaf58577561f776398de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169360
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-28 16:27:28 +00:00
Konstantin Shcheglov 2e99e59369 Fix integration tests for analyzer/ and analysis_server/ in preparation for Null Safety turned on.
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: Ibc5426dd3035c54306bed6e0dec8a6b379163057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169286
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 15:42:55 +00:00
Konstantin Shcheglov 56947222cc Fixes for analysis_server/ tests for Windows.
Change-Id: Ifcdc374a66562823f886569ad9182c86277e1797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169282
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 00:58:01 +00:00
Brian Wilkerson e2cc75e847 Fix the offset used when reporting errors inside of string literals
Also fixes a bug introduced by two incompatible changes were both
committed. Seems like the infrastructure ought to have caught it, but
it appears not to have.

Change-Id: I66a5d9f69740430bd4aedbf5c3c1ee307a92a4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169250
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-27 23:33:27 +00:00
Brian Wilkerson 29c7474845 Add a test for accessing type arguments
Change-Id: Idb72eeb468149417c570ceef63116559295caee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169280
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-27 20:59:17 +00:00
Konstantin Shcheglov a074c793b8 Rename to resolveTestCode() and resolveTestFile().
Change-Id: I69a598c5acef86c6a59212648496569423007ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-27 19:35:47 +00:00
Konstantin Shcheglov d9d7324b27 Issue 43777. Update analysis_server/ tests to run when Null Safety is enabled by default in 2.12
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: Ibd1da16b58b8304d6f1d4260615c7049fc5ffe59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-27 18:19:33 +00:00
Brian Wilkerson c45d52b62a Rework the parser to parse code fragments rather than value generators
What this means is that data file authors can specify values that are
extracted from the source being updated by writing a single string (in a
format that's a very limited subset of Dart) rather than by writing a
potentially deeply nested map structure.

Change-Id: I06011983310b1c5a4e921c3f762f5b39818ced17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169148
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-27 15:41:52 +00:00
Paul Berry 92c07fa8d2 Rename test files to end in _test.dart
The test runner that runs on the trybots only runs tests that end in
`_test.dart`, so it was failing to run these tests.

Change-Id: I77e92bafd4c907d15a7d511406ca81360aea382e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168995
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-25 19:37:05 +00:00
Brian Wilkerson 4be43f4430 Replace the implementation of an argument value with a more general way of computing a variable's value
This is backend support to allow the parser to accept a new syntax that
is more general than what is currently supported.

Change-Id: Icb660e7588d67afd403bc6cd1f493cda9accb289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168992
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-24 15:49:23 +00:00
Jens Johansen 5a6129406f [parser] Consistently disallow 'late' without 'var', 'final' or type
Fixes https://github.com/dart-lang/sdk/issues/43811
Fixes https://github.com/dart-lang/sdk/issues/43812
Fixes https://github.com/dart-lang/sdk/issues/43813

Change-Id: I39de527883d33459694ec0f91b769676eb52d54b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168641
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-23 06:28:51 +00:00
pq a9f17d4f9e fix offset for var replacement in const collection literals
Fixes: https://github.com/dart-lang/sdk/issues/43895

Change-Id: Iaea95178505859f33ed44d36b8a902cc135e5023
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168880
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-22 20:52:00 +00:00
Konstantin Shcheglov a82c098e4a Issue 43894. Fix for crash in getParameterDocumentation() when the FieldFormalParameter uses unresolved field.
Bug: https://github.com/dart-lang/sdk/issues/43894
Change-Id: I7834e28fbe6c9ba1f67c3712fef8fcc594dda261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168779
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-22 20:25:40 +00:00
Konstantin Shcheglov 934142766a Remove discarding libraries context on timeout.
Use `linkLibraries` before analysis (after save) instead.

Change-Id: I0b13888398b32cefb6815717c3b0f525492abac0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168767
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-22 16:43:00 +00:00
pq 23947aa37a bulk fix tests for excludes / ignores
Regression tests for: https://github.com/dart-lang/sdk/issues/43869

Change-Id: I7909c23b583af93cbabc4d291d31eba04dca104c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-22 15:14:50 +00:00
Danny Tuppeny 96796b9751 [Analyzer] Add commit characters to LSP completion items
Change-Id: I71b1fa18a0fd9a4051359551803bff975381a835
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168653
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-10-21 18:34:33 +00:00
pq 382dbb6861 handle hashCode fields when creating ==
Fixes: https://github.com/dart-lang/sdk/issues/43867

Change-Id: I6ee0ee4feebce13e576a351bbe9578b705076422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168582
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-20 22:38:01 +00:00
Brian Wilkerson 691d07575b Add tests for flutter-specific uses of data-driven fixes
This also adds a fix for a bug found by the tests. There are a couple of
failing tests, but they're failing because the support required for them
hasn't been implemented yet, not because of a bug.

Change-Id: Ia24dffc02aac0c4b61c9c7d8e2d744211f5b4bea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168401
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-19 21:44:27 +00:00
Brian Wilkerson 35ce26e0db Validate ignore comments
This adds checks for three cases:
- error codes for diagnostics that are not being produced,
- error codes that can't be ignored (with a severity of error), and
- error codes that are already being ignored.

I originally also checked for names that are not defined as error codes
(which turned up at least one valid issue in the Flutter repo), but we
don't have a list of all valid names against which to compare because
plugins can add new diagnostics.

It should be noted that, as written, these diagnostics can't be ignored,
despite being hints. The reason is as follows: in order to detect
diagnostics that are not being produced, these checks need to have a
list of the diagnostics that _are_ produced. If an ignore comment
attempted to ignore one of these hints, this validation would occur
before the hint had been generated, so that comment would in turn appear
to be unnecessary.

If we need them to be ignorable, then we can special case them so that
they are never reported as being unnecessary.

And after running this over the Flutter repo I commented out two of the
three codes because there are violations. Many of the violations are
valid and need to be cleaned up. Some are the result of "ignore" being
used for other purposes. The Flutter team has said that we can replace
their use of "ignore" in order to enable these hints, but I don't have
time to do that right now and I'd like to get this landed before it bit
rots again.

Change-Id: I1704105621bef5a5c49202267c99aa1d950a26a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156402
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-18 16:53:06 +00:00
Brian Wilkerson c3c6ada631 Support data-driven update of deprecated parameters in methods that are not renamed
Change-Id: I52039796668225102b9a2d81b4a276556d763324
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168121
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-16 16:49:22 +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 cb7ac82c32 Fix the computation of valid kinds
We were previously missing some cases, such as property access nodes,
while accepting too many, such as unknown cases wrapped as an argument
in a method invocation. This fixes both of those cases.

Change-Id: Id489fda9ed23ab19c42f1be451f8747ff8113ca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-14 19:29:48 +00:00
Konstantin Shcheglov fbfc723de7 Use CompoundAssignmentExpression instead of LHS element/type.
This adds some technical debt in form of using writeOrReadElement in
clients, which can be paid incrementally by migrating these places to
handling assignment like expressions one by one. Doing it all in one
CL was too much. But now the underlaying AST resolution will be
sound.

In the next breaking change we will remove
setAssignmentBackwardCompatibility(), so stop setting elements/types
for assignment targets.

Change-Id: I11626876cfed25653edb0cc18544aba51cef5965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-14 18:45:08 +00:00
Danny Tuppeny ece17f73b0 [Analyzer] Ask user whether to proceed with renames that produce errors
Fixes https://github.com/Dart-Code/Dart-Code/issues/2745.

Change-Id: Ia2770f18ebca410bce93bd2f3042e294083dc435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167621
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-14 17:46:58 +00:00
Brian Wilkerson a1682401b5 Add flag to transforms indicating whether they should be applied when running in a bulk fix mode
Change-Id: I9a2add74524bdff4280e84a7d45a207e7321c458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167421
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-13 17:39:08 +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
Paul Berry 3d039130f2 Remove unnecessary override.
This avoids a nuisance hint from the analyzer.

Change-Id: I9ddabf596858e3e833a9cea1e9d2efd7ce6923de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-12 16:35:22 +00:00
pq 97ad2d69af re-land pubspec analysis
Change-Id: I047687f2b64bfdc149bfde2fed6dc8f5d722e7a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-12 14:43:52 +00:00
Brian Wilkerson 666dad0086 Use the information we have about the kind of element when computing fixes
This puts in place support for using the element kind when determining
whether a transform applies. It is not as fully tested as it should be
but I plan to add more tests in future CLs.

Change-Id: Ife89c49384d1ceba9de5b18b7ef197018747ee25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-11 16:17:11 +00:00
Konstantin Shcheglov 52370de8fa Enforce prefer_typing_uninitialized_variables in analysis_server
Change-Id: I09294ac48ab0f86a93cd1dcdcc53cca20546fb31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166720
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-08 20:00:05 +00:00
pq c21b906182 disable pubspec linting
Disables the fix in https://dart-review.googlesource.com/c/sdk/+/164249 pending a fix to `sort_pub_dependencies` which is producing a false positive that is blocking the Flutter engine roll.

See: https://github.com/dart-lang/sdk/issues/43529
See: https://github.com/dart-lang/linter/issues/2271

Change-Id: Ica6262153b89259ba67b5a43eeeafe2bdd482b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166703
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
2020-10-08 19:39:55 +00:00
pq f84bba2897 get libraries to fix from the context collection
Fixes: https://github.com/dart-lang/sdk/issues/43694

Also implements recursive fix semantics consistent with `dart analyze`.



Change-Id: I349650a0c1704c2e2be84287b46de17ecc132d56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166602
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-08 01:34:08 +00:00
Brian Wilkerson bd6c31ad9a Do not match on parameter names
One of the bugs I recently found caused the transform for a getter to be
applied against a parameter. This CL fixes that particular issue by
correctly computing the element name to be the name of the enclosing
invocation rather than the parameter.

It also introduces an `ElementMatcher` to hold the data currently being
used to match elements with the intent that more information will be
added in the future to prevent similar sorts of mismatches.

Change-Id: I14abbece334b3dc660d3854b817362c441efa11d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166600
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-10-07 21:37:20 +00:00
Sam Rawlins ae466ef7d5 analysis_server: Bump to pedantic 1.9
Change-Id: Iec6c21abe09ecfbd74c4e1b18c0f519c0416467b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163304
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-07 13:41:35 +00:00
pq 00594be05c don’t bulk fix options-filtered errors
Change-Id: Ifa902ffa1a30a5282f4dae3e1a9487583f9c27ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-06 00:40:23 +00:00
Brian Wilkerson dbff41c62c Add failing test for issue 43667
Change-Id: I5ad0f6d67a99003ca847fe6fbad1db88d24f246c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-05 15:59:35 +00:00