[flutter_tools] delete flutter format command (#129360)
On the current stable branch (3.10.x), `flutter format` no longer works, and gives an error. This change just deletes the code. Fixes https://github.com/flutter/flutter/issues/115809
This commit is contained in:
parent
51f659825e
commit
6f3b07811b
@ -28,7 +28,6 @@ import 'src/commands/doctor.dart';
|
||||
import 'src/commands/downgrade.dart';
|
||||
import 'src/commands/drive.dart';
|
||||
import 'src/commands/emulators.dart';
|
||||
import 'src/commands/format.dart';
|
||||
import 'src/commands/generate.dart';
|
||||
import 'src/commands/generate_localizations.dart';
|
||||
import 'src/commands/ide_config.dart';
|
||||
@ -200,7 +199,6 @@ List<FlutterCommand> generateCommands({
|
||||
signals: globals.signals,
|
||||
),
|
||||
EmulatorsCommand(),
|
||||
FormatCommand(),
|
||||
GenerateCommand(),
|
||||
GenerateLocalizationsCommand(
|
||||
fileSystem: globals.fs,
|
||||
|
@ -1,39 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. 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:args/args.dart';
|
||||
|
||||
import '../base/common.dart';
|
||||
import '../runner/flutter_command.dart';
|
||||
|
||||
class FormatCommand extends FlutterCommand {
|
||||
FormatCommand();
|
||||
|
||||
@override
|
||||
ArgParser argParser = ArgParser.allowAnything();
|
||||
|
||||
@override
|
||||
final String name = 'format';
|
||||
|
||||
@override
|
||||
List<String> get aliases => const <String>['dartfmt'];
|
||||
|
||||
@override
|
||||
String get description => deprecationWarning;
|
||||
|
||||
@override
|
||||
final bool hidden = true;
|
||||
|
||||
@override
|
||||
String get deprecationWarning {
|
||||
return 'The "format" command is deprecated. Please use the "dart format" '
|
||||
'sub-command instead, which has the same command-line usage as '
|
||||
'"flutter format".\n';
|
||||
}
|
||||
|
||||
@override
|
||||
Future<FlutterCommandResult> runCommand() async {
|
||||
throwToolExit(deprecationWarning);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user