Unverified Commit 6f3b0781 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[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
parent 51f65982
...@@ -28,7 +28,6 @@ import 'src/commands/doctor.dart'; ...@@ -28,7 +28,6 @@ import 'src/commands/doctor.dart';
import 'src/commands/downgrade.dart'; import 'src/commands/downgrade.dart';
import 'src/commands/drive.dart'; import 'src/commands/drive.dart';
import 'src/commands/emulators.dart'; import 'src/commands/emulators.dart';
import 'src/commands/format.dart';
import 'src/commands/generate.dart'; import 'src/commands/generate.dart';
import 'src/commands/generate_localizations.dart'; import 'src/commands/generate_localizations.dart';
import 'src/commands/ide_config.dart'; import 'src/commands/ide_config.dart';
...@@ -200,7 +199,6 @@ List<FlutterCommand> generateCommands({ ...@@ -200,7 +199,6 @@ List<FlutterCommand> generateCommands({
signals: globals.signals, signals: globals.signals,
), ),
EmulatorsCommand(), EmulatorsCommand(),
FormatCommand(),
GenerateCommand(), GenerateCommand(),
GenerateLocalizationsCommand( GenerateLocalizationsCommand(
fileSystem: globals.fs, fileSystem: globals.fs,
......
// 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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment