Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit dfbe88b

Browse files
authored
Enable the avoid_dynamic_calls lint (#112)
1 parent 48dcc33 commit dfbe88b

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.3-dev
2+
3+
* Enable the `avoid_dynamic_calls` lint.
4+
15
## 1.0.2
26

37
* Update description.

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
include: package:lints/recommended.yaml
2+
23
analyzer:
34
strong-mode:
45
implicit-casts: false
56

67
linter:
78
rules:
89
- annotate_overrides
10+
- avoid_dynamic_calls
911
- avoid_function_literals_in_foreach_calls
1012
- avoid_init_to_null
1113
- avoid_null_checks_in_equality_operators

lib/src/logger.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Logger {
174174
Object? object;
175175
if (isLoggable(logLevel)) {
176176
if (message is Function) {
177-
message = message();
177+
message = (message as Object? Function())();
178178
}
179179

180180
String msg;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: logging
2-
version: 1.0.2
2+
version: 1.0.3-dev
33

44
description: >-
55
Provides APIs for debugging and error logging, similar to loggers in other

0 commit comments

Comments
 (0)