Devon Carew
fc1d2a82f4
[dartfix] remove the 'dartfix upgrade sdk' command (prefer 'dartdev migrate')
...
Change-Id: I981e2b1805a81210cfb0ed7af809a07eb3eabb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137221
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Janice Collins <jcollins@google.com >
2020-03-04 17:55:06 +00:00
Devon Carew
b079aae1a8
[dartfix] fix an issue with newly added tests and windows paths
...
Change-Id: I3896abf5de7357575e21b8ef3eb2f986c6764dde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-02-27 00:13:22 +00:00
Devon Carew
8b02263198
[dartdev] add a dartfix migrate command
...
Change-Id: Icb5de208e193f4003312dd849e34217ed53ca00f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136361
Reviewed-by: Janice Collins <jcollins@google.com >
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-02-26 19:30:13 +00:00
Brian Wilkerson
61199914d7
Convert dartfix to use underscores rather than hyphens for fix names
...
Change-Id: I0bd264e8c0e196aa7a5a8cb46fc940242a844f07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133406
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-26 22:56:36 +00:00
Brian Wilkerson
d29c5c174c
Refactor dartfix to make the handling of lint fixes uniform
...
Change-Id: Ib329ec89bf19fa0c7d76b7f9ccdd796e20f71a9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133404
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-25 23:09:55 +00:00
Brian Wilkerson
c9b56d3530
Remove support for default fixes from dartfix
...
Change-Id: I497f48ee0930829adf44a510101181578a4a9c86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133242
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-24 18:33:05 +00:00
Brian Wilkerson
3d7dd5bfe0
Remove the notion of required fixes from dartfix and the server
...
Change-Id: I55389e1978d11820142961b5997d2187d1e61bae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132973
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2020-01-24 01:05:41 +00:00
Janice Collins
1fb5352943
Add --migrate-dependencies hidden option for dartfix.
...
Also makes option handling more agnostic to default
and negatable values, and disallows trying to use
the preview server outside of upgrade.
Change-Id: Icff10bd016d822edc9c37c0069ebc0c851f78a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Janice Collins <jcollins@google.com >
Commit-Queue: Janice Collins <jcollins@google.com >
2020-01-02 17:21:26 +00:00
Brian Wilkerson
c7965b2cf9
Update dartfix to have an upgrade command for nnbd migration
...
Change-Id: I88f317c69c9d473c911e426e1b8d81848ab1653c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128575
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-12-17 18:23:36 +00:00
Brian Wilkerson
2eba06d26f
Stop using preview-dir and preview-port values and always open the preview tool
...
Change-Id: I1ae6aeeb95b1a976c23fe23867a6bec9b453806e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128463
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-12-16 23:28:35 +00:00
Sam Rawlins
44ba800533
dartfix: Fix for new lints in pedantic 0.9:
...
* always_declare_return_types
* annotate_overrides
* prefer_null_aware
Change-Id: I981b54b7d3422f08a990d0ac2c52ca5f4e65ac39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128312
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-16 04:11:26 +00:00
Brian Wilkerson
17443b2ab7
Add a preview-port option to dartfix and rename outputDir to preview-dir for consistency.
...
It also renames 'all.dart' to 'test_all.dart' for consistency and adds
tests that had not been added to it but should have been.
Change-Id: I54db5a3e7ac59e3b6d52bda158b781157d86c386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124082
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2019-11-06 02:16:57 +00:00
Brian Wilkerson
e00c8f3cb7
Add a command-line option to dartfix to specify the output directory
...
Change-Id: I5cc1b73427f95554bf2f20aa54923d9c3808e1f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117463
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-09-17 13:46:27 +00:00
danrubel
8b2993568e
implement dartfix --pedantic
...
This CL adds a new --pedantic option to dartfix for applying all fixes
marked as pedantic. In addition, this addresses comments in
https://dart-review.googlesource.com/c/sdk/+/111840
Change-Id: Ia2e7a792911f19edb698c126c8fd77cd8f8f77cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-08-05 20:18:05 +00:00
danrubel
3c1f679684
refactor driver test and remove required option shortcut
...
Change-Id: I5b5caa5aa4621f9f463a816391911bb6364b9e38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-08-03 01:41:09 +00:00
danrubel
3f22f1f5df
do not include double-to-int fix by default
...
This changes the default fixes applied by dartfix so that it no longer
converts doubles to ints by default. The fix can still be applied
by specifying '--fix double-to-int' on the command line.
Change-Id: I751a42a9c6ae6589259e0b7ac5c769fd4efc4313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-07-30 18:05:50 +00:00
Dan Rubel
d6c85f4e92
rename dartfix "exclude" option to "excludeFix"
...
This renames the "exclude" option to make it more clear exactly
what is being excluded, similar to the earlier change renaming
"include" to "fix".
Change-Id: I07d164d480c8e389e5c7353db81e7633f0efd3d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109921
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-07-22 20:17:57 +00:00
Devon Carew
91eb2f5fd0
[analyzer] rename the dartfix --include <fix> option to dartfix --fix <fix>
...
Change-Id: Ibd5d8c45912a292e1a787e88ddb06e730ebda0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109548
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2019-07-22 16:35:18 +00:00
Dan Rubel
8bb8a29f8b
refactor dartfix lint fixes
...
This replaces several very similar lint fixes with a single BasicFixLintTask
thereby making it easier to add new fixes for existing lints.
In addition, the dartfix test names have been normalized
to match the corresponding DartFix info and additional tests added.
Change-Id: Ia3d1e0ffcb14d34e0af5d49650888eb2c49a9b42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-07-09 21:42:55 +00:00
Nicholas Shahan
d992f55094
[dartfix] Bump pedantic dep to v1.8.0 and cleanup lint violations
...
This version added three new lints:
* prefer_iterable_whereType
* unnecessary_const
* unnecessary_new
Change-Id: I99b5f3df86a0243091699cd2f3e1d38b5c5a9216
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108381
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2019-07-09 16:25:19 +00:00
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