Unverified Commit 4f606f79 authored by Daco Harkes's avatar Daco Harkes Committed by GitHub

Fix formatting (#137613)

Badly formatted code causes distraction when reading, and costs people energy when understanding code.
parent 69c2ab4f
...@@ -10,7 +10,7 @@ import 'package:meta/meta.dart' show immutable; ...@@ -10,7 +10,7 @@ import 'package:meta/meta.dart' show immutable;
/// Both the [versionMin] and [versionMax] are inclusive versions, and undefined /// Both the [versionMin] and [versionMax] are inclusive versions, and undefined
/// values represent an unknown minimum/maximum version. /// values represent an unknown minimum/maximum version.
@immutable @immutable
class VersionRange{ class VersionRange {
const VersionRange( const VersionRange(
this.versionMin, this.versionMin,
this.versionMax, this.versionMax,
......
...@@ -205,7 +205,7 @@ class VariableDumpMachineProjectValidator extends MachineProjectValidator { ...@@ -205,7 +205,7 @@ class VariableDumpMachineProjectValidator extends MachineProjectValidator {
/// Validator run for all platforms that extract information from the pubspec.yaml. /// Validator run for all platforms that extract information from the pubspec.yaml.
/// ///
/// Specific info from different platforms should be written in their own ProjectValidator. /// Specific info from different platforms should be written in their own ProjectValidator.
class GeneralInfoProjectValidator extends ProjectValidator{ class GeneralInfoProjectValidator extends ProjectValidator {
@override @override
Future<List<ProjectValidatorResult>> start(FlutterProject project) async { Future<List<ProjectValidatorResult>> start(FlutterProject project) async {
final FlutterManifest flutterManifest = project.manifest; final FlutterManifest flutterManifest = project.manifest;
...@@ -316,7 +316,7 @@ class PubDependenciesProjectValidator extends ProjectValidator { ...@@ -316,7 +316,7 @@ class PubDependenciesProjectValidator extends ProjectValidator {
jsonResult = json.decode( jsonResult = json.decode(
processResult.stdout.toString() processResult.stdout.toString()
) as LinkedHashMap<String, dynamic>; ) as LinkedHashMap<String, dynamic>;
} on FormatException{ } on FormatException {
result.add(_createProjectValidatorError(name, processResult.stderr.toString())); result.add(_createProjectValidatorError(name, processResult.stderr.toString()));
return result; return result;
} }
......
...@@ -20,7 +20,7 @@ import '../../src/test_flutter_command_runner.dart'; ...@@ -20,7 +20,7 @@ import '../../src/test_flutter_command_runner.dart';
class ProjectValidatorDummy extends ProjectValidator { class ProjectValidatorDummy extends ProjectValidator {
@override @override
Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async{ Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async {
return <ProjectValidatorResult>[ return <ProjectValidatorResult>[
const ProjectValidatorResult(name: 'pass', value: 'value', status: StatusProjectValidator.success), const ProjectValidatorResult(name: 'pass', value: 'value', status: StatusProjectValidator.success),
const ProjectValidatorResult(name: 'fail', value: 'my error', status: StatusProjectValidator.error), const ProjectValidatorResult(name: 'fail', value: 'my error', status: StatusProjectValidator.error),
...@@ -39,7 +39,7 @@ class ProjectValidatorDummy extends ProjectValidator { ...@@ -39,7 +39,7 @@ class ProjectValidatorDummy extends ProjectValidator {
class ProjectValidatorSecondDummy extends ProjectValidator { class ProjectValidatorSecondDummy extends ProjectValidator {
@override @override
Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async{ Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async {
return <ProjectValidatorResult>[ return <ProjectValidatorResult>[
const ProjectValidatorResult(name: 'second', value: 'pass', status: StatusProjectValidator.success), const ProjectValidatorResult(name: 'second', value: 'pass', status: StatusProjectValidator.success),
const ProjectValidatorResult(name: 'other fail', value: 'second fail', status: StatusProjectValidator.error), const ProjectValidatorResult(name: 'other fail', value: 'second fail', status: StatusProjectValidator.error),
...@@ -57,7 +57,7 @@ class ProjectValidatorSecondDummy extends ProjectValidator { ...@@ -57,7 +57,7 @@ class ProjectValidatorSecondDummy extends ProjectValidator {
class ProjectValidatorCrash extends ProjectValidator { class ProjectValidatorCrash extends ProjectValidator {
@override @override
Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async{ Future<List<ProjectValidatorResult>> start(FlutterProject project, {Logger? logger, FileSystem? fileSystem}) async {
throw Exception('my exception'); throw Exception('my exception');
} }
......
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