You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# treat missing required parameters as a warning (not a hint)
7
+
missing_required_param: warning
8
+
# treat missing returns as a warning (not a hint)
9
+
missing_return: warning
10
+
todo: warning
11
+
# Ignore analyzer hints for updating pubspecs when using Future or
12
+
# Stream and not importing dart:async
13
+
# Please see https://github.com/flutter/flutter/pull/24528 for details.
14
+
sdk_version_async_exported_from_core: ignore
7
15
exclude:
8
16
- lib/l10n/messages_*.dart
9
-
- lib/generated/**
10
17
- ios/**
11
-
12
18
linter:
13
19
rules:
14
20
- always_declare_return_types
15
21
- always_put_control_body_on_new_line
16
-
# - always_put_required_named_parameters_first
22
+
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
17
23
- always_require_non_null_named_parameters
18
24
# - always_specify_types
19
25
- annotate_overrides
20
-
- avoid_annotating_with_dynamic
26
+
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
21
27
# - avoid_as
22
-
# - avoid_bool_literals_in_conditional_expressions under review (see 1068)
23
-
- avoid_catches_without_on_clauses
24
-
- avoid_catching_errors
28
+
- avoid_bool_literals_in_conditional_expressions # not yet tested
29
+
- avoid_catches_without_on_clauses# we do this commonly
30
+
- avoid_catching_errors# we do this commonly
25
31
- avoid_classes_with_only_static_members
26
-
# - avoid_double_and_int_checks under review (see 1068)
32
+
- avoid_double_and_int_checks # only useful when targeting JS runtime
27
33
- avoid_empty_else
28
-
# - avoid_field_initializers_in_const_classes under review (see 1068)
34
+
- avoid_field_initializers_in_const_classes
29
35
- avoid_function_literals_in_foreach_calls
30
-
- avoid_implementing_value_types
36
+
- avoid_implementing_value_types# not yet tested
31
37
- avoid_init_to_null
32
-
# - avoid_js_rounded_ints under review (see 1068)
38
+
- avoid_js_rounded_ints # only useful when targeting JS runtime
33
39
- avoid_null_checks_in_equality_operators
34
-
- avoid_positional_boolean_parameters
35
-
# - avoid_private_typedef_functions under review (see 1068)
36
-
# - avoid_relative_lib_imports under review (see 1068)
37
-
# - avoid_renaming_method_parameters under review (see 1068)
40
+
- avoid_positional_boolean_parameters# not yet tested
41
+
- avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
42
+
- avoid_relative_lib_imports
43
+
- avoid_renaming_method_parameters
38
44
- avoid_return_types_on_setters
39
-
- avoid_returning_null
40
-
- avoid_returning_this
41
-
- avoid_setters_without_getters
42
-
# - avoid_single_cascade_in_expression_statements under review (see 1068)
45
+
- avoid_returning_null # there are plenty of valid reasons to return null
46
+
- avoid_returning_null_for_future # not yet tested
47
+
- avoid_returning_null_for_void
48
+
- avoid_returning_this # there are plenty of valid reasons to return this
49
+
- avoid_setters_without_getters # not yet tested
50
+
- avoid_shadowing_type_parameters # not yet tested
51
+
- avoid_single_cascade_in_expression_statements # not yet tested
43
52
- avoid_slow_async_io
44
-
# - avoid_types_as_parameter_names under review (see 1068)
45
-
- avoid_types_on_closure_parameters
46
-
# - avoid_unused_constructor_parameters under review (see 1068)
47
-
# - avoid_void_async under review (see 1068)
53
+
- avoid_types_as_parameter_names
54
+
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
55
+
- avoid_unused_constructor_parameters
56
+
# - avoid_void_async
48
57
- await_only_futures
49
58
- camel_case_types
50
59
- cancel_subscriptions
51
-
- cascade_invocations
52
-
- close_sinks
53
-
- comment_references
54
-
- constant_identifier_names
60
+
- cascade_invocations# not yet tested
61
+
- close_sinks# not reliable enough
62
+
- comment_references# blocked on https://github.com/flutter/flutter/issues/20765
63
+
- constant_identifier_names# needs an opt-out https://github.com/dart-lang/linter/issues/204
55
64
- control_flow_in_finally
56
-
# - curly_braces_in_flow_control_structures under review (see 1068)
65
+
- curly_braces_in_flow_control_structures # not yet tested
57
66
- directives_ordering
58
67
- empty_catches
59
68
- empty_constructor_bodies
60
69
- empty_statements
61
-
# - file_names under review (see 1068)
70
+
- file_names # not yet tested
71
+
- flutter_style_todos
62
72
- hash_and_equals
63
73
- implementation_imports
64
-
- invariant_booleans
74
+
- invariant_booleans# too many false positives: https://github.com/dart-lang/linter/issues/811
65
75
- iterable_contains_unrelated_type
66
-
- join_return_with_assignment
76
+
- join_return_with_assignment# not yet tested
67
77
- library_names
68
78
- library_prefixes
69
-
# - lines_longer_than_80_chars under review (see 1068)
79
+
- lines_longer_than_80_chars # not yet tested
70
80
- list_remove_unrelated_type
71
-
- literal_only_boolean_expressions
81
+
- literal_only_boolean_expressions# too many false positives: https://github.com/dart-lang/sdk/issues/34181
72
82
- no_adjacent_strings_in_list
73
83
- no_duplicate_case_values
74
84
- non_constant_identifier_names
75
-
# - null_closures under review (see 1068)
76
-
- omit_local_variable_types
77
-
# - one_member_abstracts
78
-
- only_throw_errors
85
+
- null_closures # not yet tested
86
+
- omit_local_variable_types# opposite of always_specify_types
0 commit comments