A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | |||||||||||||||||||||||||||
2 | Lint Style | HAS DART FIX | Lints (Core) | Lints (Recommended) | Flutter Lints | Pedantic | Effective Dart | Flutter SDK (repository) | Lint | Very Good Analysis | RydMike | ||||||||||||||||
3 | YES/NO | v3.0.0 | v3.0.0 | v3.0.1 | v1.11.1 (Deprecated) | V1.3.2 (Deprecated) | (master) | v2.2.0 (strict/package) | v5.1.0 | v2.2.0 | |||||||||||||||||
4 | Analyzer | ||||||||||||||||||||||||||
5 | language: | ||||||||||||||||||||||||||
6 | strict-casts: | true | true | true | true | ||||||||||||||||||||||
7 | |||||||||||||||||||||||||||
8 | |||||||||||||||||||||||||||
9 | strict-inference: | true | true | true | |||||||||||||||||||||||
10 | |||||||||||||||||||||||||||
11 | |||||||||||||||||||||||||||
12 | strict-raw-types: | true | true | true | |||||||||||||||||||||||
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: | error | error | error | |||||||||||||||||||||||
20 | How to treat missing required parameters? ignore, hint, warning or error? | ||||||||||||||||||||||||||
21 | |||||||||||||||||||||||||||
22 | missing_return: | error | error | error | |||||||||||||||||||||||
23 | How to treat missing required return? ignore, hint, warning or error? | ||||||||||||||||||||||||||
24 | |||||||||||||||||||||||||||
25 | record_literal_one_positional_no_trailing_comma: | error | error | ||||||||||||||||||||||||
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: | warning | warning | ||||||||||||||||||||||||
29 | Invocation collection methods with arguments of unrelated types. | ||||||||||||||||||||||||||
30 | |||||||||||||||||||||||||||
31 | unrelated_type_equality_checks: | warning | warning | ||||||||||||||||||||||||
32 | Invocation of equality operator == with references of unrelated types. | ||||||||||||||||||||||||||
33 | |||||||||||||||||||||||||||
34 | parameter_assignments: | warning | warning | ||||||||||||||||||||||||
35 | How to treat assigning new values to parameters of methods or functions. | ||||||||||||||||||||||||||
36 | |||||||||||||||||||||||||||
37 | todo: | ignore | ignore | ||||||||||||||||||||||||
38 | How to treat TODOs in the code? ignore, hint, warning or error? | ||||||||||||||||||||||||||
39 | |||||||||||||||||||||||||||
40 | deprecated_member_use_from_same_package: | ignore | ignore | ||||||||||||||||||||||||
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_imports | ON | ON | ||||||||||||||||||||||||
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_calls | ON | ON | ON | ON | ||||||||||||||||||||||
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_else | ON | ON | ON | ON | ON | ON | ON | |||||||||||||||||||
63 | Avoid empty else statements. | YES | |||||||||||||||||||||||||
64 | https://dart.dev/tools/linter-rules/avoid_empty_else.html | ||||||||||||||||||||||||||
65 | avoid_print | ON | ON | ON | ON | ON | |||||||||||||||||||||
66 | Avoid print calls in production code. | YES | (for release) | ||||||||||||||||||||||||
67 | https://dart.dev/tools/linter-rules/avoid_print.html | ||||||||||||||||||||||||||
68 | avoid_relative_lib_imports | ON | ON | ON | ON | ON | ON | ON | ON | ON | |||||||||||||||||
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_io | ON | ON | ON | |||||||||||||||||||||||
75 | Avoid slow async dart:io methods. | NO | |||||||||||||||||||||||||
76 | https://dart.dev/tools/linter-rules/avoid_slow_async_io.html | ||||||||||||||||||||||||||
77 | avoid_type_to_string | ON | ON | ON | ON | ||||||||||||||||||||||
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_names | ON | ON | ON | ON | ON | ON | ON | ON | ||||||||||||||||||
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_flutter | ON | ON | ON | ON | ||||||||||||||||||||||
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_subscriptions | ON | ON | ON | ON | ||||||||||||||||||||||
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_type | ON | ON | ON | ON | ON | ON | ON | |||||||||||||||||||
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_references | ON | ON | ||||||||||||||||||||||||
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 |