mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 05:25:19 +00:00
Applied consistent code formatting across all packages using \$ melos format
└> dart format .
└> RUNNING (in 8 packages)
--------------------------------------------------------------------------------
benchmark_di:
Formatted 18 files (0 changed) in 0.30 seconds.
benchmark_di: SUCCESS
--------------------------------------------------------------------------------
cherrypick:
Formatted 24 files (0 changed) in 0.34 seconds.
cherrypick: SUCCESS
--------------------------------------------------------------------------------
cherrypick_annotations:
Formatted 11 files (0 changed) in 0.14 seconds.
cherrypick_annotations: SUCCESS
--------------------------------------------------------------------------------
cherrypick_flutter:
Formatted 3 files (0 changed) in 0.15 seconds.
cherrypick_flutter: SUCCESS
--------------------------------------------------------------------------------
cherrypick_generator:
Formatted 17 files (0 changed) in 0.27 seconds.
cherrypick_generator: SUCCESS
--------------------------------------------------------------------------------
client_app:
Formatted 4 files (0 changed) in 0.14 seconds.
client_app: SUCCESS
--------------------------------------------------------------------------------
postly:
Formatted lib/router/app_router.gr.dart
Formatted 23 files (1 changed) in 0.33 seconds.
postly: SUCCESS
--------------------------------------------------------------------------------
talker_cherrypick_logger:
Formatted 4 files (0 changed) in 0.18 seconds.
talker_cherrypick_logger: SUCCESS
--------------------------------------------------------------------------------
$ melos format
└> dart format .
└> SUCCESS. No functional or logic changes included.
50 lines
1.6 KiB
Dart
50 lines
1.6 KiB
Dart
import 'package:cherrypick/cherrypick.dart';
|
|
|
|
class MockObserver implements CherryPickObserver {
|
|
final List<String> diagnostics = [];
|
|
final List<String> warnings = [];
|
|
final List<String> errors = [];
|
|
final List<List<String>> cycles = [];
|
|
final List<String> bindings = [];
|
|
|
|
@override
|
|
void onDiagnostic(String message, {Object? details}) =>
|
|
diagnostics.add(message);
|
|
|
|
@override
|
|
void onWarning(String message, {Object? details}) => warnings.add(message);
|
|
|
|
@override
|
|
void onError(String message, Object? error, StackTrace? stackTrace) => errors.add(
|
|
'$message${error != null ? ' $error' : ''}${stackTrace != null ? '\n$stackTrace' : ''}');
|
|
|
|
@override
|
|
void onCycleDetected(List<String> chain, {String? scopeName}) =>
|
|
cycles.add(chain);
|
|
|
|
@override
|
|
void onBindingRegistered(String name, Type type, {String? scopeName}) =>
|
|
bindings.add('$name $type');
|
|
|
|
@override
|
|
void onInstanceRequested(String name, Type type, {String? scopeName}) {}
|
|
@override
|
|
void onInstanceCreated(String name, Type type, Object instance,
|
|
{String? scopeName}) {}
|
|
@override
|
|
void onInstanceDisposed(String name, Type type, Object instance,
|
|
{String? scopeName}) {}
|
|
@override
|
|
void onModulesInstalled(List<String> moduleNames, {String? scopeName}) {}
|
|
@override
|
|
void onModulesRemoved(List<String> moduleNames, {String? scopeName}) {}
|
|
@override
|
|
void onScopeOpened(String name) {}
|
|
@override
|
|
void onScopeClosed(String name) {}
|
|
@override
|
|
void onCacheHit(String name, Type type, {String? scopeName}) {}
|
|
@override
|
|
void onCacheMiss(String name, Type type, {String? scopeName}) {}
|
|
}
|