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
Sync with analysis_options.yaml in flutter/packages
Some packages require package upgrade rather than simple modification
(ex: google_maps_flutter) Therefore, the rules below are temporarily ignored.
Any necessary modifications can be applied in a later PR.
flutter/packages#4060
- unnecessary_null_comparison
flutter/packages#4067
- unawaited_futures
flutter/packages#5717
- dangling_library_doc_comments
- no_literal_bool_comparisons
- unnecessary_library_directive
- use_colored_box
- use_enums
- use_string_in_part_of_directives
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
26
-
- always_require_non_null_named_parameters
27
32
- always_specify_types
28
33
# - always_use_package_imports # we do this commonly
29
34
- annotate_overrides
30
35
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
31
36
- avoid_bool_literals_in_conditional_expressions
32
37
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
33
38
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
34
-
- avoid_classes_with_only_static_members
39
+
#- avoid_classes_with_only_static_members # we do this commonly for `abstract final class`es
35
40
- avoid_double_and_int_checks
36
41
- avoid_dynamic_calls
37
42
- avoid_empty_else
@@ -40,7 +45,7 @@ linter:
40
45
- avoid_field_initializers_in_const_classes
41
46
# - avoid_final_parameters # incompatible with prefer_final_parameters
42
47
- avoid_function_literals_in_foreach_calls
43
-
- avoid_implementing_value_types
48
+
#- avoid_implementing_value_types # see https://github.com/dart-lang/linter/issues/4558
44
49
- avoid_init_to_null
45
50
- avoid_js_rounded_ints
46
51
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
@@ -52,8 +57,6 @@ linter:
52
57
- avoid_relative_lib_imports
53
58
- avoid_renaming_method_parameters
54
59
- avoid_return_types_on_setters
55
-
- avoid_returning_null
56
-
- avoid_returning_null_for_future
57
60
- avoid_returning_null_for_void
58
61
# - avoid_returning_this # there are enough valid reasons to return `this` that this lint ends up with too many false positives
59
62
- avoid_setters_without_getters
@@ -74,17 +77,20 @@ linter:
74
77
# - cascade_invocations # doesn't match the typical style of this repo
75
78
- cast_nullable_to_non_nullable
76
79
# - close_sinks # not reliable enough
77
-
# - combinators_ordering # DIFFERENT FROM FLUTTER/FLUTTER: This isn't available on stable yet.
80
+
- collection_methods_unrelated_type
81
+
- combinators_ordering
78
82
# - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142
79
83
- conditional_uri_does_not_exist
80
84
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
81
85
- control_flow_in_finally
82
86
- curly_braces_in_flow_control_structures
87
+
# - dangling_library_doc_comments # Temporarily ingnored from flutter-tizen.
83
88
- depend_on_referenced_packages
84
89
- deprecated_consistency
90
+
# - deprecated_member_use_from_same_package # we allow self-references to deprecated members
85
91
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
86
92
- directives_ordering
87
-
# - discarded_futures # not yet tested
93
+
# - discarded_futures # too many false positives, similar to unawaited_futures
88
94
# - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic
89
95
- empty_catches
90
96
- empty_constructor_bodies
@@ -95,23 +101,29 @@ linter:
95
101
- flutter_style_todos
96
102
- hash_and_equals
97
103
- implementation_imports
98
-
- iterable_contains_unrelated_type
104
+
- implicit_call_tearoffs
105
+
- implicit_reopen
106
+
- invalid_case_patterns
99
107
# - join_return_with_assignment # not required by flutter style
100
108
- leading_newlines_in_multiline_strings
109
+
- library_annotations
101
110
- library_names
102
111
- library_prefixes
103
112
- library_private_types_in_public_api
104
113
# - lines_longer_than_80_chars # not required by flutter style
105
-
- list_remove_unrelated_type
106
-
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/linter/issues/453
114
+
- literal_only_boolean_expressions
115
+
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
107
116
- missing_whitespace_between_adjacent_strings
108
117
- no_adjacent_strings_in_list
109
118
- no_default_cases
110
119
- no_duplicate_case_values
111
120
- no_leading_underscores_for_library_prefixes
112
121
- no_leading_underscores_for_local_identifiers
122
+
# - no_literal_bool_comparisons # Temporarily ingnored from flutter-tizen.
113
123
- no_logic_in_create_state
114
124
- no_runtimeType_toString # DIFFERENT FROM FLUTTER/FLUTTER
125
+
- no_self_assignments
126
+
- no_wildcard_variable_uses
115
127
- non_constant_identifier_names
116
128
- noop_primitive_operations
117
129
- null_check_on_nullable_type_parameter
@@ -136,12 +148,11 @@ linter:
136
148
# - prefer_constructors_over_static_methods # far too many false positives
137
149
- prefer_contains
138
150
# - prefer_double_quotes # opposite of prefer_single_quotes
139
-
- prefer_equal_for_default_values
140
151
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
141
152
- prefer_final_fields
142
153
- prefer_final_in_for_each
143
154
- prefer_final_locals
144
-
# - prefer_final_parameters # we should enable this one day when it can be auto-fixed (https://github.com/dart-lang/linter/issues/3104), see also parameter_assignments
155
+
# - prefer_final_parameters # adds too much verbosity
145
156
- prefer_for_elements_to_map_fromIterable
146
157
- prefer_foreach
147
158
- prefer_function_declarations_over_variables
@@ -156,7 +167,7 @@ linter:
156
167
- prefer_is_not_empty
157
168
- prefer_is_not_operator
158
169
- prefer_iterable_whereType
159
-
#- prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
170
+
- prefer_mixin
160
171
# - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
161
172
- prefer_null_aware_operators
162
173
- prefer_relative_imports
@@ -167,10 +178,10 @@ linter:
167
178
- provide_deprecation_message
168
179
- public_member_api_docs # DIFFERENT FROM FLUTTER/FLUTTER
169
180
- recursive_getters
170
-
# - require_trailing_commas # blocked on https://github.com/dart-lang/sdk/issues/47441
181
+
# - require_trailing_commas # would be nice, but requires a lot of manual work: 10,000+ code locations would need to be reformatted by hand after bulk fix is applied
171
182
- secure_pubspec_urls
172
183
- sized_box_for_whitespace
173
-
#- sized_box_shrink_expand # not yet tested
184
+
- sized_box_shrink_expand
174
185
- slash_for_doc_comments
175
186
- sort_child_properties_last
176
187
- sort_constructors_first
@@ -181,15 +192,18 @@ linter:
181
192
- tighten_type_of_initializing_formals
182
193
# - type_annotate_public_apis # subset of always_specify_types
183
194
- type_init_formals
184
-
# - unawaited_futures # too many false positives, especially with the way AnimationController works
195
+
- type_literal_in_constant_pattern
196
+
# - unawaited_futures # DIFFERENT FROM FLUTTER/FLUTTER: It's disabled there for "too many false positives"; that's not an issue here, and missing awaits have caused production issues in plugins. # Temporarily ingnored from flutter-tizen.
185
197
- unnecessary_await_in_return
186
198
- unnecessary_brace_in_string_interps
199
+
- unnecessary_breaks
187
200
- unnecessary_const
188
201
- unnecessary_constructor_name
189
202
# - unnecessary_final # conflicts with prefer_final_locals
190
203
- unnecessary_getters_setters
191
204
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
192
205
- unnecessary_late
206
+
# - unnecessary_library_directive # Temporarily ingnored from flutter-tizen.
0 commit comments