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