Skip to content

Commit aa33f45

Browse files
authored
refactor: resolve various analysis warnings (#1929)
1 parent 367238a commit aa33f45

10 files changed

Lines changed: 28 additions & 4 deletions

File tree

examples/basic_authentication/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ dependency_overrides:
55
path: ../../packages/dart_frog_auth
66
dart_frog_lint:
77
path: ../../packages/dart_frog_lint
8+
# Remove when coverage reporting is fixed.
9+
# https://github.com/dart-lang/test/pull/2594
10+
test: 1.26.3

examples/bearer_authentication/pubspec_overrides.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ dependency_overrides:
44
dart_frog_auth:
55
path: ../../packages/dart_frog_auth
66
dart_frog_lint:
7-
path: ../../packages/dart_frog_lint
7+
path: ../../packages/dart_frog_lint
8+
# Remove when coverage reporting is fixed.
9+
# https://github.com/dart-lang/test/pull/2594
10+
test: 1.26.3

examples/counter/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

examples/echo/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

examples/hello_world/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

examples/kitchen_sink/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

examples/todos/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

examples/web_socket_counter/pubspec_overrides.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ dependency_overrides:
33
path: ../../packages/dart_frog
44
dart_frog_lint:
55
path: ../../packages/dart_frog_lint
6+
# Remove when coverage reporting is fixed.
7+
# https://github.com/dart-lang/test/pull/2594
8+
test: 1.26.3

packages/dart_frog/lib/src/router.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ class RouterEntry {
309309
Middleware? middleware,
310310
bool mounted = false,
311311
}) {
312-
middleware = middleware ?? ((Handler fn) => fn);
313-
314312
if (!route.startsWith('/')) {
315313
throw ArgumentError.value(
316314
route,
@@ -343,7 +341,7 @@ class RouterEntry {
343341
verb,
344342
route,
345343
handler,
346-
middleware,
344+
middleware ?? ((Handler fn) => fn),
347345
routePattern,
348346
params,
349347
mounted,

packages/dart_frog_test/example/test/routes/dice_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ void main() {
3030
test(
3131
'only allows post method',
3232
() async {
33+
// ignoring for testing.
34+
// ignore: experimental_member_use
3335
await expectNotAllowedMethods(
3436
route.onRequest,
3537
contextBuilder: (method) => TestRequestContext(

0 commit comments

Comments
 (0)