Resolved all Dart analyzer warnings across multiple files

This commit is contained in:
Sergey Penkovsky
2025-08-01 11:20:23 +03:00
parent 123ed6ce02
commit a889cf0d40
9 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
analyzer:
errors:
deprecated_member_use: ignore
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options

View File

@@ -1,4 +1,3 @@
import 'package:benchmark_runner/benchmark_runner.dart';
import 'package:benchmark_cherrypick/cherrypick_benchmark.dart';
import 'package:benchmark_cherrypick/complex_bindings_benchmark.dart';
import 'package:benchmark_cherrypick/async_chain_benchmark.dart';

View File

@@ -1,3 +1,4 @@
// ignore: depend_on_referenced_packages
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:cherrypick/cherrypick.dart';

View File

@@ -1,3 +1,4 @@
// ignore: depend_on_referenced_packages
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:cherrypick/cherrypick.dart';

View File

@@ -1,3 +1,4 @@
// ignore: depend_on_referenced_packages
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:cherrypick/cherrypick.dart';

View File

@@ -1,3 +1,4 @@
// ignore: depend_on_referenced_packages
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:cherrypick/cherrypick.dart';

View File

@@ -48,6 +48,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.3"
lints:
dependency: "direct dev"
description:
name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
source: hosted
version: "5.1.1"
meta:
dependency: transitive
description:
@@ -57,4 +65,4 @@ packages:
source: hosted
version: "1.17.0"
sdks:
dart: ">=3.5.0 <4.0.0"
dart: ">=3.6.0 <4.0.0"

View File

@@ -11,5 +11,6 @@ dependencies:
path: ../cherrypick
dev_dependencies:
lints: ^5.0.0
benchmark_harness: ^2.2.2
benchmark_runner: ^0.0.2

View File

@@ -200,11 +200,13 @@ class AsyncServiceB {
class AsyncCircularModule extends Module {
@override
void builder(Scope currentScope) {
// ignore: deprecated_member_use_from_same_package
bind<AsyncServiceA>().toProvideAsync(() async {
final serviceB = await currentScope.resolveAsync<AsyncServiceB>();
return AsyncServiceA(serviceB);
});
// ignore: deprecated_member_use_from_same_package
bind<AsyncServiceB>().toProvideAsync(() async {
final serviceA = await currentScope.resolveAsync<AsyncServiceA>();
return AsyncServiceB(serviceA);