ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1
2
Lint StyleHAS DART
FIX
Lints
(Core)
Lints
(Recommended)
Flutter LintsPedanticEffective DartFlutter SDK
(repository)
LintVery Good
Analysis
RydMike
3
YES/NOv2.0.0v2.0.0v2.0.1v1.11.1
(Deprecated)
V1.3.2
(Deprecated)
(master)v1.10.0v3.1.0v2.0.0
4
Analyzer
5
language:
6
strict-casts:truetruetrue
7
8
9
strict-inference:truetrue
10
11
12
strict-raw-types:truetruetrue
13
14
15
strong-mode:
16
implicit-casts:false
17
(To be deprecated in Dart, in favor of strict-casts)
18
19
implicit-dynamic:
20
(To be deprecated in Dart, in favor of strict-raw-types)
21
22
errors:
23
included_file_warning:warningignore
24
Ignore this when we explicitly enabled even conflicting rules and are fixing the conflicts.
25
26
missing_required_param:errorerrorerror
27
How to treat missing required parameters? ignore, hint, warning or error?
28
29
missing_return:errorerrorerror
30
How to treat missing required return? ignore, hint, warning or error?
31
32
parameter_assignments:warningwarning
33
How to treat assigning new values to parameters of methods or functions.
34
35
todo:ignoreignore
36
How to treat TODOs in the code? ignore, hint, warning or error?
37
38
deprecated_member_use_from_same_package:ignore
39
How to treat self-reference to deprecated members? ignore, hint, warning or error?
40
41
sdk_version_async_exported_from_core:
42
How to treat analyzer hints for updating pubspecs when using Future or Stream and
not importing dart:async? ignore, hint, warning or error?
43
See https://github.com/flutter/flutter/pull/24528 for details
44
unnecessary_null_comparison:ignore
45
How to treat unnecessary null comparison? ignore, hint, warning or error?
46
47
close_sinks:ignore
48
How to treat close sinks? ignore, hint, warning or error?
49
50
exclude:
51
List of files excluded from analysis
- "bin/cache/**"
- "dev/conductor/lib/proto/*"'
- "test/.test_coverage.dart"
- "lib/generated_plugin_registrant.dart"
- "**/*.g.dart"
- "**/*.freezed.dart"
- "test/.test_coverage.dart"
- "bin/cache/**"
- "lib/generated_plugin_registrant.dart"
52
53
Error Rules
54
always_use_package_importsONON
55
Avoid relative imports for files in lib/.YES
56
https://dart-lang.github.io/linter/lints/always_use_package_imports.html
57
avoid_dynamic_callsONONONON
58
Avoid method calls or property accesses on a "dynamic" target.NO
59
https://dart-lang.github.io/linter/lints/avoid_dynamic_calls.html
60
avoid_empty_elseONONONONONONON
61
Avoid empty else statements.YES
62
https://dart-lang.github.io/linter/lints/avoid_empty_else.html
63
avoid_printONONONONON
64
Avoid print calls in production code.YES(for release)
65
https://dart-lang.github.io/linter/lints/avoid_print.html
66
avoid_relative_lib_importsONONONONONONONONON
67
Avoid relative imports for files in lib/.YES
68
https://dart-lang.github.io/linter/lints/avoid_relative_lib_imports.html
69
avoid_returning_null_for_futureONONONON
70
Avoid returning null for Future.YES
71
https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html
72
avoid_slow_async_ioONONON
73
Avoid slow async dart:io methods.NO
74
https://dart-lang.github.io/linter/lints/avoid_slow_async_io.html
75
avoid_type_to_stringONONONON
76
Avoid runtime type .toString() in production code since results may be minified.NO
77
https://dart-lang.github.io/linter/lints/avoid_type_to_string.html
78
avoid_types_as_parameter_namesONONONONONONONON
79
Avoid types as parameter names.YES
80
https://dart-lang.github.io/linter/lints/avoid_types_as_parameter_names.html
81
avoid_web_libraries_in_flutterONONONON
82
Avoid using web-only libraries outside Flutter web plugin packages.NO
83
https://dart-lang.github.io/linter/lints/avoid_web_libraries_in_flutter.html
84
cancel_subscriptionsONONONON
85
Cancel instances of dart.async.StreamSubscription.NO
86
https://dart-lang.github.io/linter/lints/cancel_subscriptions.html
87
close_sinks
88
Close instances of dart.core.Sink.
(RydMike: Has issue https://github.com/dart-lang/linter/issues/1381)
NO
89
https://dart-lang.github.io/linter/lints/close_sinks.html
90
collection_methods_unrelated_typeON
91
Invocation of various collection methods with arguments of unrelated types.NO
92
https://dart-lang.github.io/linter/lints/collection_methods_unrelated_type.html
93
comment_referencesONON
94
Only reference in scope identifiers in doc comments. Issue https://github.com/dart-lang/linter/issues/1142
NO
95
https://dart-lang.github.io/linter/lints/comment_references.html
96
control_flow_in_finallyONONONONONON
97
Avoid control flow in finally blocks.NO
98
https://dart-lang.github.io/linter/lints/control_flow_in_finally.html
99
diagnostic_describe_all_propertiesON
100
DO reference all public properties in debug methods.YES(packages)