From e1a4722cfce542af7af483fe963f4d06098f5d7d Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Mon, 28 Feb 2022 14:12:15 +0100 Subject: [PATCH 1/4] Fix typo in `PackageTimeoutException` and translate docs to English --- .../lib/src/commands/src/analyze_command.dart | 2 +- .../lib/src/commands/src/pub_get_command.dart | 2 +- .../lib/src/common/src/package_timeout_exception.dart | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/sz_repo_cli/lib/src/commands/src/analyze_command.dart b/tools/sz_repo_cli/lib/src/commands/src/analyze_command.dart index 8974a3884..2fd210546 100644 --- a/tools/sz_repo_cli/lib/src/commands/src/analyze_command.dart +++ b/tools/sz_repo_cli/lib/src/commands/src/analyze_command.dart @@ -160,7 +160,7 @@ class AnalyzePackagesUseCase { .timeout( packageTimeout, onTimeout: () => - throw PackageTimoutException(packageTimeout, package), + throw PackageTimeoutException(packageTimeout, package), ) .then((_) => _statusUpdater.success()) .catchError((e, s) => _statusUpdater.failure(error: e, stackTrace: s)) diff --git a/tools/sz_repo_cli/lib/src/commands/src/pub_get_command.dart b/tools/sz_repo_cli/lib/src/commands/src/pub_get_command.dart index 24d670533..ce0b93c0d 100644 --- a/tools/sz_repo_cli/lib/src/commands/src/pub_get_command.dart +++ b/tools/sz_repo_cli/lib/src/commands/src/pub_get_command.dart @@ -99,7 +99,7 @@ class GetPackagesUseCase { .timeout( packageTimeout, onTimeout: () => - throw PackageTimoutException(packageTimeout, package), + throw PackageTimeoutException(packageTimeout, package), ) .then((_) => _statusUpdater.success()) .catchError( diff --git a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart index 8b744c555..bbcf91087 100644 --- a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart +++ b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart @@ -8,19 +8,19 @@ import 'package.dart'; -/// [package] hat länger als [packageTimeout] gebraucht, um eine Aktion -/// (z.B. flutter test) auszuführen. -class PackageTimoutException implements Exception { +/// Exception thrown when [package] executed longer than [packageTimeout] for an +/// action like running "flutter test". +class PackageTimeoutException implements Exception { final Duration packageTimeout; final Package package; - PackageTimoutException( + PackageTimeoutException( this.packageTimeout, this.package, ); @override String toString() { - return 'Das Package "${package.name}" [${package.type.toReadableString()}] hat den Package-Timeout von ${packageTimeout.inMinutes} Minuten überschritten.'; + return 'The Package "${package.name}" [${package.type.toReadableString()}] has passed timeout of ${packageTimeout.inMinutes} minutes.'; } } From 6ac66eefbceb51e3bfe817d4ebb36c7c4a986d03 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Mon, 28 Feb 2022 14:12:55 +0100 Subject: [PATCH 2/4] Change `toString` --- .../lib/src/common/src/package_timeout_exception.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart index bbcf91087..5f3752759 100644 --- a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart +++ b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart @@ -21,6 +21,6 @@ class PackageTimeoutException implements Exception { @override String toString() { - return 'The Package "${package.name}" [${package.type.toReadableString()}] has passed timeout of ${packageTimeout.inMinutes} minutes.'; + return 'The package "${package.name}" [${package.type.toReadableString()}] passed the timeout of ${packageTimeout.inMinutes} minutes.'; } } From 7bab7a2d1f9ae734b92667cc2e7beca62c5aa432 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Mon, 28 Feb 2022 14:14:29 +0100 Subject: [PATCH 3/4] Remove running --- .../lib/src/common/src/package_timeout_exception.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart index 5f3752759..7eb73b5f0 100644 --- a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart +++ b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart @@ -9,7 +9,7 @@ import 'package.dart'; /// Exception thrown when [package] executed longer than [packageTimeout] for an -/// action like running "flutter test". +/// action like "flutter test". class PackageTimeoutException implements Exception { final Duration packageTimeout; final Package package; From 3da0df90dc433794e01e3687d9c832f843529fc2 Mon Sep 17 00:00:00 2001 From: Nils Reichardt Date: Mon, 28 Feb 2022 22:22:21 +0100 Subject: [PATCH 4/4] Update tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart Co-authored-by: Jonas Sander <29028262+Jonas-Sander@users.noreply.github.com> --- .../lib/src/common/src/package_timeout_exception.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart index 7eb73b5f0..8de95a533 100644 --- a/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart +++ b/tools/sz_repo_cli/lib/src/common/src/package_timeout_exception.dart @@ -21,6 +21,6 @@ class PackageTimeoutException implements Exception { @override String toString() { - return 'The package "${package.name}" [${package.type.toReadableString()}] passed the timeout of ${packageTimeout.inMinutes} minutes.'; + return 'The package "${package.name}" [${package.type.toReadableString()}] has exceeded the timeout of ${packageTimeout.inMinutes} minutes.'; } }