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
Copy file name to clipboardExpand all lines: analysis_options.yaml
+30-11Lines changed: 30 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ analyzer:
42
42
# see https://github.com/dart-lang/sdk/issues/28463
43
43
- "lib/i18n/messages_*.dart"
44
44
- "lib/src/http/**"
45
+
- "test_fixes/**"
45
46
46
47
linter:
47
48
rules:
@@ -53,6 +54,7 @@ linter:
53
54
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
54
55
- always_require_non_null_named_parameters
55
56
- always_specify_types
57
+
# - always_use_package_imports # we do this commonly
56
58
- annotate_overrides
57
59
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
58
60
# - avoid_as # required for implicit-casts: true
@@ -63,6 +65,7 @@ linter:
63
65
# - avoid_double_and_int_checks # only useful when targeting JS runtime
64
66
- avoid_empty_else
65
67
- avoid_equals_and_hash_code_on_mutable_classes
68
+
# - avoid_escaping_inner_quotes # not yet tested
66
69
- avoid_field_initializers_in_const_classes
67
70
- avoid_function_literals_in_foreach_calls
68
71
# - avoid_implementing_value_types # not yet tested
@@ -81,9 +84,10 @@ linter:
81
84
- avoid_returning_null_for_void
82
85
# - avoid_returning_this # there are plenty of valid reasons to return this
83
86
# - avoid_setters_without_getters # not yet tested
84
-
#- avoid_shadowing_type_parameters # not yet tested
87
+
- avoid_shadowing_type_parameters
85
88
- avoid_single_cascade_in_expression_statements
86
89
- avoid_slow_async_io
90
+
# - avoid_type_to_string # we do this commonly
87
91
- avoid_types_as_parameter_names
88
92
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
89
93
# - avoid_unnecessary_containers # not yet tested
@@ -95,53 +99,59 @@ linter:
95
99
- camel_case_types
96
100
- cancel_subscriptions
97
101
# - cascade_invocations # not yet tested
102
+
- cast_nullable_to_non_nullable
98
103
# - close_sinks # not reliable enough
99
104
# - comment_references # blocked on https://github.com/flutter/flutter/issues/20765
100
105
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
101
106
- control_flow_in_finally
102
-
# - curly_braces_in_flow_control_structures # not yet tested
107
+
# - curly_braces_in_flow_control_structures # not required by flutter style
103
108
# - diagnostic_describe_all_properties # not yet tested
104
109
- directives_ordering
110
+
# - do_not_use_environment # we do this commonly
105
111
- empty_catches
106
112
- empty_constructor_bodies
107
113
- empty_statements
114
+
- exhaustive_cases
108
115
# - file_names # not yet tested
109
116
- flutter_style_todos
110
117
- hash_and_equals
111
118
- implementation_imports
112
119
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
113
120
- iterable_contains_unrelated_type
114
-
# - join_return_with_assignment # not yet tested
121
+
# - join_return_with_assignment # not required by flutter style
122
+
- leading_newlines_in_multiline_strings
115
123
- library_names
116
124
- library_prefixes
117
-
# - lines_longer_than_80_chars # not yet tested
125
+
# - lines_longer_than_80_chars # not required by flutter style
118
126
- list_remove_unrelated_type
119
127
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
120
128
# - missing_whitespace_between_adjacent_strings # not yet tested
121
129
- no_adjacent_strings_in_list
130
+
# - no_default_cases # too many false positives
122
131
- no_duplicate_case_values
123
-
#- no_logic_in_create_state # not yet tested
124
-
# - no_runtimeType_toString # not yet tested
132
+
- no_logic_in_create_state
133
+
# - no_runtimeType_toString # ok in tests; we enable this only in packages/
125
134
- non_constant_identifier_names
126
-
# - null_closures # not yet tested
135
+
- null_check_on_nullable_type_parameter
136
+
# - null_closures # not required by flutter style
127
137
# - omit_local_variable_types # opposite of always_specify_types
128
138
# - one_member_abstracts # too many false positives
0 commit comments