mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:07:57 +00:00
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>
This commit is contained in:
parent
872e90106e
commit
a82e025739
|
@ -32,6 +32,7 @@ dart2js_tools:pkg/dart2js_tools/lib
|
|||
dart_internal:pkg/dart_internal/lib
|
||||
dart_style:third_party/pkg_tested/dart_style/lib
|
||||
dartdoc:third_party/pkg/dartdoc/lib
|
||||
dartfix:pkg/dartfix/lib
|
||||
dev_compiler:pkg/dev_compiler/lib
|
||||
diagnostic:pkg/diagnostic/lib
|
||||
expect:pkg/expect/lib
|
||||
|
|
|
@ -9,7 +9,6 @@ import 'embedder_test.dart' as embedder_test;
|
|||
import 'error_test.dart' as error_test;
|
||||
import 'errors_reported_once_test.dart' as errors_reported_once_test;
|
||||
import 'errors_upgrade_fails_cli_test.dart' as errors_upgrade_fails_cli_test;
|
||||
import 'fix/options_test.dart' as fix_options;
|
||||
import 'options_test.dart' as options_test;
|
||||
import 'package_prefix_test.dart' as package_prefix_test;
|
||||
import 'perf_report_test.dart' as perf_report_test;
|
||||
|
@ -25,7 +24,6 @@ main() {
|
|||
error_test.main();
|
||||
errors_reported_once_test.main();
|
||||
errors_upgrade_fails_cli_test.main();
|
||||
fix_options.main();
|
||||
options_test.main();
|
||||
package_prefix_test.main();
|
||||
perf_report_test.main();
|
||||
|
|
4
pkg/dartfix/.gitignore
vendored
Normal file
4
pkg/dartfix/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
*.iml
|
||||
.dart_tool
|
||||
.packages
|
||||
pubspec.lock
|
6
pkg/dartfix/analysis_options.yaml
Normal file
6
pkg/dartfix/analysis_options.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
linter:
|
||||
rules:
|
||||
- empty_constructor_bodies
|
||||
- empty_statements
|
||||
- unnecessary_brace_in_string_interps
|
||||
- valid_regexps
|
|
@ -3,7 +3,7 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:analyzer_cli/src/fix/driver.dart';
|
||||
import 'package:dartfix/src/driver.dart';
|
||||
|
||||
/// The entry point for dartfix.
|
||||
main(List<String> args) async {
|
|
@ -8,11 +8,11 @@ import 'dart:io' show File, Directory;
|
|||
import 'package:analysis_server/protocol/protocol_constants.dart';
|
||||
import 'package:analysis_server/protocol/protocol_generated.dart';
|
||||
import 'package:analysis_server/src/protocol/protocol_internal.dart';
|
||||
import 'package:analyzer_cli/src/fix/context.dart';
|
||||
import 'package:analyzer_cli/src/fix/options.dart';
|
||||
import 'package:analyzer_cli/src/fix/server.dart';
|
||||
import 'package:analyzer_plugin/protocol/protocol_common.dart';
|
||||
import 'package:cli_util/cli_logging.dart';
|
||||
import 'package:dartfix/src/context.dart';
|
||||
import 'package:dartfix/src/options.dart';
|
||||
import 'package:dartfix/src/server.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
class Driver {
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:analyzer/src/util/sdk.dart';
|
||||
import 'package:analyzer_cli/src/fix/context.dart';
|
||||
import 'package:dartfix/src/context.dart';
|
||||
import 'package:args/args.dart';
|
||||
import 'package:cli_util/cli_logging.dart';
|
||||
import 'package:path/path.dart' as path;
|
19
pkg/dartfix/pubspec.yaml
Normal file
19
pkg/dartfix/pubspec.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: dartfix
|
||||
version: 0.1.0
|
||||
author: Dart Team <misc@dartlang.org>
|
||||
description:
|
||||
A tool for migrating Dart source to newer versions of the Dart SDK,
|
||||
and fixing common issues.
|
||||
environment:
|
||||
sdk: '>=2.0.0 <3.0.0'
|
||||
dependencies:
|
||||
#TODO(danrubel) depend upon analysis_server_client rather than analysis_server
|
||||
# once analysis_server_client has been updated.
|
||||
analysis_server: any
|
||||
analyzer: ^0.33.0
|
||||
analyzer_plugin: any
|
||||
args: any
|
||||
cli_util: any
|
||||
path: any
|
||||
dev_dependencies:
|
||||
test: ^1.3.0
|
9
pkg/dartfix/test/all.dart
Normal file
9
pkg/dartfix/test/all.dart
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'src/options_test.dart' as options_test;
|
||||
|
||||
main() {
|
||||
options_test.main();
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:analyzer_cli/src/fix/options.dart';
|
||||
import 'package:dartfix/src/options.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:test/test.dart';
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
|
||||
import 'package:analyzer_cli/src/fix/context.dart';
|
||||
import 'package:cli_util/cli_logging.dart';
|
||||
import 'package:dartfix/src/context.dart';
|
||||
|
||||
class TestContext with ResourceProviderMixin implements Context {
|
||||
@override
|
|
@ -69,6 +69,7 @@ collection/test/equality_test/04: Fail # Issue 1533
|
|||
collection/test/equality_test/05: Fail # Issue 1533
|
||||
collection/test/equality_test/none: Pass, Fail # Issue 14348
|
||||
compiler/tool/*: SkipByDesign # Only meant to run on vm
|
||||
dartfix/test/*: SkipByDesign # Only meant to run on vm
|
||||
front_end/test/*: SkipByDesign # Only meant to run on vm, most use dart:mirrors and dart:io
|
||||
front_end/tool/*: SkipByDesign # Only meant to run on vm
|
||||
smith/test/*: SkipByDesign # Only meant to run on vm
|
||||
|
|
Loading…
Reference in a new issue