Commit Graph

4772 Commits

Author SHA1 Message Date
Brian Wilkerson b03ef5b3fe Convert more doc comments in analysis_server
Change-Id: I333d0af4444226a8152e840c4d9015fb4c30bd32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 19:29:28 +00:00
pq d42b7bc15a partition imported/not-imported suggestion sets / de-dup
Change-Id: Iba72b3599e9153e9fac3dd883d7bdb272c25fa65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-13 15:57:28 +00:00
Brian Wilkerson e75c9192a1 Start converting dartdoc style in analysis_server
Change-Id: I013659a0f34dafce4c091dc534e2ab8ef0469217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 15:00:03 +00:00
Brian Wilkerson 16033f922d Enable prefer_contains in analysis_server
Change-Id: Idac9828eb452f685452a33e6946ece2ba0d197f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 14:52:08 +00:00
Brian Wilkerson 1cc9413926 Add dartfix support for prefer_contains
Change-Id: I0f3c8a6198560ed36d465ebd08c40ed438a79bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135490
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 14:51:59 +00:00
pq a0323c755f convert test path (for windows)
Change-Id: I8abb8605d1161147ae6bbcdb2139767b2ad020a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135621
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-13 13:53:48 +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
Brian Wilkerson 86b1b9d03c Enhance member depth completion metrics
This now looks in mixins (which were ignored before) and finds matches
from interfaces, reporting the interfaces separately from the superclass
and mixin chain.

Change-Id: Id5f3379261e1ec184dc347abb371693481b65680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135528
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 22:16:32 +00:00
pq afaeb04137 sanity check project files for errors
Change-Id: Ie530f0aec435440abbcf4a1feb34ee7cb53ebab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135524
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-12 21:12:37 +00:00
Brian Wilkerson 4f6a5811fc Add json support to completion metrics computation
Change-Id: I43e987c946dc5c3b200ced14c132a31cc97b5f29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135560
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 21:03:37 +00:00
pq 5fd18be9c5 track analysis errors
Adds analysis error tracking and fixes the enum declaration to not produce a warning.

I'm not happy with `assertNoAnalysisErrors` and would like something more configurable and context-aware but haven't thought it fully through.

Maybe something like:

```
assertNoErrors(
  except: ['unused_import'],
);
```

(And maybe a file and line number?)

Alternatively, we could add ignores to the test sources:

```
import 'a.dart'; // ignore: unused_import
```

and maybe special case the line we're completing on:

```
f(^);
```


Still mulling it all over but your thoughts are welcome!


Change-Id: I1d0c5fbd72c80dde13ae98cb76c3728ab00a12f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135440
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 15:42:57 +00:00
Devon Carew 0299903f3e [nnbd preview] restore navigation in the code editor
Change-Id: I4f3678c8edc5ce606d727ce964806689bcf4a38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135383
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 01:12:05 +00:00
Brian Wilkerson 680e109ad2 Gather more code completion metrics
The code is now gathering both element and token data in several places
where it used to gather only one of the two (using a new utility method).

The metrics are now better labeled to make the output easier to read.

It's also gathering a new metric: the distance between the static type
of a target and the class in which a referenced member is declared.

Change-Id: I566c02b069749221983ec960b8a67b293052bd93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135400
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 23:55:15 +00:00
Konstantin Shcheglov b63e3f9425 Replace AnalysisOptions.enabledExperiments with contextFeatures.
There should be just one source of FeatureSet, so that when we add
--default-language-version flag, we apply it to the FeatureSet, and
set as the default for the context.

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

Change-Id: If140768bb51db1b0f736b91ab5d624e22100405e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135347
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-11 20:16:14 +00:00
Brian Wilkerson 7ce78365bf Remove the old relevance analyzer
Change-Id: I8537fafa4997e9470e8b4c3f2a2f5b730ae3aa5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135360
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 19:55:54 +00:00
pq 42e840c6ae convert all paths
Change-Id: I6d32fd26e9959ad4b880e90a9ca61504d4e9be0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135345
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-11 19:24:44 +00:00
Brian Wilkerson cbc9c47145 An initial attempt to gather metrics to guide ranking of suggestions
Change-Id: Ic06466dfe5919cc3a462e35fb6328a02bc795229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135342
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-02-11 19:13:54 +00:00
pq b9fbf58e33 filtering on kinds; relevance boosting
Change-Id: I4eaacd5da1b5435b116fdff7c1615e265d5ba96e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135321
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 18:42:54 +00:00
pq 30151a6541 wait for SDK suggestions
Change-Id: I7439daff3bf828406520a5a3c061928695258c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135240
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 04:30:31 +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
pq 5457012b81 driver test suggestion support
Still some simplifying assumptions but on the path to correct.

Change-Id: I3f0d86fc3152ce3333b9d615ac700b703aa3b071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135205
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-10 23:40:05 +00:00
Devon Carew c969c51aa4 [nnbd preview] update item presentation; show line numbers
Change-Id: I2f07385229101d93985366b35982b761243ad08b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135184
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-10 22:39:25 +00:00
pq 10f2b8fc76 migrate path specification to driver clients
(Hard-wired paths are making tests harder to write.)

Change-Id: Ifb996e78c18cc8249b9ee0f18e6db52097778d47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-10 19:06:25 +00:00
pq 3d97d22fe5 completion driver suggestions
The absolute minimum to see suggestions wired through.

Lots of work to flesh out the client-implemented algorithms.

For reference:

* https://github.com/Dart-Code/Dart-Code/blob/master/src/extension/providers/dart_completion_item_provider.ts
* https://github.com/JetBrains/intellij-plugins/blob/master/Dart/src/com/jetbrains/lang/dart/ide/completion/DartServerCompletionContributor.java

Change-Id: Idc78fca787b095e5b6236481b89ddb21c0ed9c94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134877
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-10 17:07:29 +00:00
Devon Carew 3a8264cb35 [nnbd preview] iteration on the nnbd preview tool ui; fix layout and scrolling
Change-Id: I1d5ddc855c3f47971436668d3d64f8ff63e377e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134872
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-07 23:52:00 +00:00
Brian Wilkerson c6b0ee3931 Convert the remaining fix tests using a lint marker and remove the ability to use a marker
Several of the tests were testing conditions that cannot occur and hence
were either re-written or removed. There's one test that I couldn't get
working so I marked it as failing. I marked another test as failing
rather than remove it because I think we want to update the lint to
catch that case (it's failing because no lint is produced).

Change-Id: I852c3c4595b0993ce2a64cbd9da1b6c7339dd59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-07 20:22:26 +00:00
Sam Rawlins af7b5fa4c6 NNBD preview: Nav tree hrefs should always use forward slashes
Change-Id: I64cfb42f8623649707b153fbefa3a6cccf343a5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134788
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-02-07 00:21:34 +00:00
Devon Carew 8f5b1ea9bb [nnbd preview] general UI improvements to the NNBD preview tool
Bug: https://github.com/dart-lang/sdk/issues/40487
Change-Id: I0864720d6a7f9d24a4582bb0034cbcb2875a54fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134767
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 23:37:55 +00:00
pq f0df6039bf extended member completions in extensions
See: https://github.com/dart-lang/sdk/issues/39093

Change-Id: I1848be7f9da0e9f424bcfe3c2dd7e50c194e5f0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134784
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 23:31:54 +00:00
Konstantin Shcheglov 1f47e5b23d Revert "Analyze SDK with non-nullable experiment enabled, update MockSdk."
This reverts commit 545b80ef0e.

Reason for revert: this is a breaking change for MockSdk users, actually much more serious issue for un-forking SDK. https://github.com/dart-lang/sdk/issues/40500

Original change's description:
> Analyze SDK with non-nullable experiment enabled, update MockSdk.
> 
> Change-Id: I80264a6533045c33ed794a5938f6719f3b5a6d0b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134401
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: If8c3d8322986b01012fa76f9c928f35309c00e3e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 22:55:29 +00:00
Jaime Wren a8a4497cc6 Some tests for the utilities in metrics_util.dart, part of the completion metrics.
Change-Id: I2cccfe899d38ce5518a32c8a26fd4d3511cf91d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134569
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 21:33:35 +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
Jaime Wren efefe78522 [completion metrics] Add a simple CLI at the start of completion_metrics.dart. This will allow run configurations in IntelliJ hold onto the directory paths instead of being hard coded.
Change-Id: I90680e9a867a5dc48f20bfd8fac3ecece6177c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134740
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 19:00:32 +00:00
Konstantin Shcheglov 545b80ef0e Analyze SDK with non-nullable experiment enabled, update MockSdk.
Change-Id: I80264a6533045c33ed794a5938f6719f3b5a6d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 18:04:02 +00:00
pq 8439158668 completion driver wip
Gotta start somewhere.

All subject to revision.  (Names especially.)

This gets us an end-to-end test and a starting point for client algorithm implementations.

Note that this was designed to run outside `test/`.  We should be able to move it out if so desired.

Needless to say any thoughts on any of it are welcome!

Change-Id: Iecf5c7ce854f619aa5677454091ceb68dd45827b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134542
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 00:33:10 +00:00
Devon Carew 204a70d4bd [nnbd migration] add an initial readme to describe the workflow and tool
Change-Id: I6d1614aafd0b722c633fba0aa128f90acb4ea006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134560
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-05 21:48:49 +00:00
Konstantin Shcheglov 0b870e2ff6 Update RemoveMethodDeclarationTest to be consistent.
The actual motivator is though that test_method was failing.

I suspect that this is a linter issue, `super.toString()`, when called
from legacy library and referencing NNBD SDK, is MethodMember, and
probably linter does not handle this right. I believe that this is
not a problem we should test or fix in analysis_server, so I update
the test to verify what is implemented in the server.

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

Change-Id: Iffe896deb138cd8f2da15ccf67a571491b544512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134406
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-02-05 20:35:59 +00:00
Devon Carew 0631e949b2 [migration tool] fail the CI if the generated files haven't been rebuilt
Change-Id: I824f8528b5b2bf2efec4121e017d77bab5b6ab60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-05 20:25:39 +00:00
Brian Wilkerson 0617d85227 Add a fix for the prefer_contains lint
Change-Id: I296bf15939b8dafd514db927859602ed91cb800d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134501
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 19:45:29 +00:00
Konstantin Shcheglov af4b6014f6 Move createAnalysisOptionsFile() call to setUp().
So, that individual tests call call it with different options,
and don't be overwritten in resolveTestUnit().

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

Change-Id: I75f5d40b36b78b62eee7ed3f64ef49d1c30752ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 19:26:28 +00:00
Jaime Wren 5d3c91b68e Fix the MeanReciprocalRankComputer computation math, the computed MRR computation was not the MRR, follow up tests coming soon.
Change-Id: I3ae4486eada3ab41b21190050a7a7a2368432004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134414
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 19:18:51 +00:00
Brian Wilkerson e2a528d976 Remove the lint marker from more fix tests
Some of the tests were fairly seriously broken, so this fixes them.

Some of the tests were testing that we don't provide a fix when there is
no lint, but I don't think that it's useful to test that.

One test required no changes other than removing the marker.

Change-Id: I6d85fd98506fa20d8bf4996d30603feb8b1ff252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134500
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 18:10:49 +00:00
Mike Fairhurst eff4807eef [analysis_server] Fix #36352, cannot stop a plugin that isn't running
Report it as a silent exception. This way it will show up in log files
and (in the future) over crash reporting (since we haven't solved the
underlying cause), but *not* to users, because it currently appears to
be harmless.

In the future we should consider a "logged-only" type of exception, once
we are confident this isn't causing secondary issues, if we don't intend
to or think we are able to solve this at a deeper level.

Change-Id: I2ee339718fbd6e7c684ccc42718fbb57742f2dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134467
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-02-05 17:13:59 +00:00
Konstantin Shcheglov 34893faa60 Use DartType.getDisplayString() instead of toString().
Change-Id: I982a4fff312593e6788afcbc9200a83793fefb97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:41:22 +00:00
Devon Carew f51187a18d [migration tool] convert the javascript code in the migration tool to dart
Change-Id: I5145be275dda77de3c25d80a13812803217d6452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134403
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-04 21:46:08 +00:00
Jaime Wren 270829d7eb Refactor the CompletionMetricsComputer class into three classes: a subclass and two concrete classes, AbstractCompletionMetricsComputer, CompletionCoverageMetrics and RelevanceAnalyzerMetrics.
This change breaks up the lengthy algorithm, and greatly speeds up the Relevance Analyzer tests.

Change-Id: I4273bcabe7399f80aa751c5963a53fa04e1b4d25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-04 19:34:56 +00:00
Sam Rawlins 44814d320f Final fix for analyzer windows bots; don't canonicalize
Something is weird with our ResourceProviders and Context.canonicalize.
It causes the following:

newFolder(convertPath("/p3"));
resourceProvider.getResource(convertPath("/p3")) is File; // false
resourceProvider.getResource(
    context.canonicalize(convertPath("/p3"))) is File; // true

Change-Id: Iafbfb6ad1bfc912a6850faf063778879dc97fe62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134143
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-02-03 23:03:56 +00:00
Jaime Wren e5d5434715 Standard output improvement from metrics_util.dart to print "<no counts>" if the counter has no counts.
Change-Id: I3d01f539670bb8d57f6b04b16cc4f92aaa2aa1c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-03 22:50:07 +00:00
Jaime Wren 78fe10c3be Completion metrics change- add missing documentation in the relevance_analyzers.dart file, as well as adding DartCompletionRequest as an input to the analyzers
Change-Id: I31c2523252f2574f092b44ec8b67d346804ac856
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134220
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-03 20:50:26 +00:00
Brian Wilkerson 00e4d8f33d Change the tests of quick fixes so they can use real lint results
This adds support so that tests of lint-based quick fix tests can use
the output of the linter rather than cons-ing up a fake lint to drive
the test. It also converts many of the existing tests to use real lints.

There were/are an amazing number of tests that were invalid and needed
to be fixed. This includes fixes for some of them, but there are still
several tests that have not been converted because they fail when run
using the output of the linter. Some of these are invalid tests, but
some might indicate bugs in the quick fix generation that should be
fixed.

Change-Id: Iea806849ea111dc8454073e8fe44fd42c5208652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134141
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-03 15:34:55 +00:00