Commit Graph

15 Commits

Author SHA1 Message Date
danrubel f7d3e5bebf Add dartfix --server option
This adds a --server option for specifying the analyis server snapshot
to be used when calculating fixes.

Change-Id: I0adc3148c030d23a9a62883d842851709cb78168
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106220
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-18 03:07:58 +00:00
Dan Rubel b324850eae cleanup list of fixes in dartfix help text
This CL cleans up the displayed help text, better organizes and displays
the list of fixes that are or can be applied, and addresses
a comment in https://dart-review.googlesource.com/c/sdk/+/105002

Change-Id: I2e71001ae7eda61b3b01ce999cb9fdca968a9b93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105322
Commit-Queue: Dan Rubel <danrubel@google.com>
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2019-06-06 19:57:12 +00:00
Dan Rubel ba8e5f6535 list fixes when displaying help
This removes this --list option from dartfix and instead displays
the list of fixes when the --help option is specified.

Partially addresses https://github.com/dart-lang/sdk/issues/36875

Change-Id: Ibd8b124c2c20a752f7e661672eac8aa2e4483b26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105002
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-06 14:22:15 +00:00
Devon Carew ab84e36989 [dartfix] refactor the dartfix cli UI a bit
Change-Id: I9935ace979b0302d4f68c8a84ed9886a0ccf0c4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101761
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-05-08 18:51:11 +00:00
danrubel a417659fcd debug dartfix test
... by ensuring that logged information is echoed to console

Change-Id: I8e9c71d0fc6f164637c35d28415cdf02e9a47b9a
Reviewed-on: https://dart-review.googlesource.com/c/94880
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-02-28 20:39:16 +00:00
danrubel 1596f437bd debug dartfix test
This test passes when run locally, but fails on the bots.
Time to gather more information.

Change-Id: Iccfbd52161b03f8119017612fc66f899cc9e5178
Reviewed-on: https://dart-review.googlesource.com/c/94801
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-02-28 17:18:49 +00:00
danrubel 3afc3b58d0 Add dartfix protocol integration tests
... and address comments in https://dart-review.googlesource.com/c/sdk/+/91780

Change-Id: Ibd01a0de575065cf18822b806a9c687de2667add
Reviewed-on: https://dart-review.googlesource.com/c/92243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-07 06:21:57 +00:00
danrubel 1c173c2ce7 Enhance dartfix to allow including and excluding specific fixes
This add several options to the dartfix command line
so that only specific fixes can be applied rather than all fixes.

Fix https://github.com/dart-lang/sdk/issues/35539

Change-Id: I8bb89696b0b47a291ed22aa00d4787f3ea5aa4be
Reviewed-on: https://dart-review.googlesource.com/c/91780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-01 16:55:17 +00:00
danrubel fe6b384ff5 revise dartfix protocol version check
Change-Id: I655773791189dd5cf133ade8a48ed39ff48b6345
Reviewed-on: https://dart-review.googlesource.com/c/89402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-15 15:52:54 +00:00
danrubel 93306f5ec0 Add dartfix integration test
... and update changelog and tweak SDK constraints

Change-Id: Ifb3e733b84c3aecad0ff8fe805f77ef497248f3b
Reviewed-on: https://dart-review.googlesource.com/c/86600
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-17 04:37:07 +00:00
danrubel b607f65217 More dartfix tests
This adds a test that asserts the analysis_server_client version
matches the version specified in the dartfix pubspec.

In addition, this remove code that reads the version
from dartfix pubspec.yaml because the pubspec.yaml is not present
when dartfix is activated and run via pub global activate.

Change-Id: I6deed00428afb8844d03a9604699e0c089d7ce6f
Reviewed-on: https://dart-review.googlesource.com/c/84940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-11-20 17:47:27 +00:00
Dan Rubel 784ad29470 Update dartfix to check analysis server protocol version
This updates dartfix to more narrowly verify the analysis server
protocol version and print instructions for the user if the protocol
version expected by dartfix is incompatible with the current Dart SDK.
This is necessary because the edit.dartfix protocol is experimental
and will continue to evolve.

Change-Id: Ib31eb594a8a94416cb4fc676e7da9150f8c99b6a
Reviewed-on: https://dart-review.googlesource.com/c/84780
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-19 21:14:28 +00:00
Dan Rubel a074bcf93c Update dartfix package for publication
Updates to dartfix for publication including:
* add changelog, readme, and license
* update pubspec version and executables

along with a collection of smaller changes including:
* test cleanup
* remove duplicate time value from verbose output
* read dartfix pubspec version and pass that to analysis server

Change-Id: Ifa94df45e6cbcf9a98f7bf393c22e06eaab48c38
Reviewed-on: https://dart-review.googlesource.com/c/82240
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-31 17:36:51 +00:00
Dan Rubel 6294171508 comment cleanup
Change-Id: I83bf6513b1acd9faedb14f1bf44e32df76dd8528
Reviewed-on: https://dart-review.googlesource.com/c/82164
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-31 14:25:35 +00:00
danrubel a82e025739 Move dartfix to its own package
Fix https://github.com/dart-lang/sdk/issues/34765

Change-Id: I44b3ccc4861b383601fea1b006f1fd4726b11062
Reviewed-on: https://dart-review.googlesource.com/c/81080
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-10-22 17:50:25 +00:00