2020
2121analyzer :
2222 strong-mode :
23+ implicit-casts : false
2324 implicit-dynamic : false
2425 errors :
2526 # treat missing required parameters as a warning (not a hint)
@@ -38,9 +39,7 @@ analyzer:
3839 # see https://github.com/dart-lang/sdk/issues/28463
3940 - " lib/i18n/messages_*.dart"
4041 - " lib/src/http/**"
41- - " example/**"
42- - " example_swift/**"
43- - " test/**"
42+
4443linter :
4544 rules :
4645 # these rules are documented on and in the same order as
@@ -60,14 +59,17 @@ linter:
6059 - avoid_classes_with_only_static_members
6160 # - avoid_double_and_int_checks # only useful when targeting JS runtime
6261 - avoid_empty_else
62+ - avoid_equals_and_hash_code_on_mutable_classes
6363 - avoid_field_initializers_in_const_classes
6464 - avoid_function_literals_in_foreach_calls
6565 # - avoid_implementing_value_types # not yet tested
6666 - avoid_init_to_null
6767 # - avoid_js_rounded_ints # only useful when targeting JS runtime
6868 - avoid_null_checks_in_equality_operators
6969 # - avoid_positional_boolean_parameters # not yet tested
70+ # - avoid_print # not yet tested
7071 # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
72+ # - avoid_redundant_argument_values # not yet tested
7173 - avoid_relative_lib_imports
7274 - avoid_renaming_method_parameters
7375 - avoid_return_types_on_setters
@@ -77,13 +79,16 @@ linter:
7779 # - avoid_returning_this # there are plenty of valid reasons to return this
7880 # - avoid_setters_without_getters # not yet tested
7981 # - avoid_shadowing_type_parameters # not yet tested
80- # - avoid_single_cascade_in_expression_statements # not yet tested
82+ - avoid_single_cascade_in_expression_statements
8183 - avoid_slow_async_io
8284 - avoid_types_as_parameter_names
8385 # - avoid_types_on_closure_parameters # conflicts with always_specify_types
86+ # - avoid_unnecessary_containers # not yet tested
8487 - avoid_unused_constructor_parameters
8588 - avoid_void_async
89+ # - avoid_web_libraries_in_flutter # not yet tested
8690 - await_only_futures
91+ - camel_case_extensions
8792 - camel_case_types
8893 - cancel_subscriptions
8994 # - cascade_invocations # not yet tested
@@ -109,8 +114,11 @@ linter:
109114 # - lines_longer_than_80_chars # not yet tested
110115 - list_remove_unrelated_type
111116 # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
117+ # - missing_whitespace_between_adjacent_strings # not yet tested
112118 - no_adjacent_strings_in_list
113119 - no_duplicate_case_values
120+ # - no_logic_in_create_state # not yet tested
121+ # - no_runtimeType_toString # not yet tested
114122 - non_constant_identifier_names
115123 # - null_closures # not yet tested
116124 # - omit_local_variable_types # opposite of always_specify_types
@@ -136,9 +144,9 @@ linter:
136144 - prefer_equal_for_default_values
137145 # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
138146 - prefer_final_fields
139- # - prefer_final_in_for_each # not yet tested
147+ - prefer_final_in_for_each
140148 - prefer_final_locals
141- # - prefer_for_elements_to_map_fromIterable # not yet tested
149+ - prefer_for_elements_to_map_fromIterable
142150 - prefer_foreach
143151 # - prefer_function_declarations_over_variables # not yet tested
144152 - prefer_generic_function_type_aliases
@@ -150,9 +158,11 @@ linter:
150158 # - prefer_interpolation_to_compose_strings # not yet tested
151159 - prefer_is_empty
152160 - prefer_is_not_empty
161+ - prefer_is_not_operator
153162 - prefer_iterable_whereType
154163 # - prefer_mixin # https://github.com/dart-lang/language/issues/32
155164 # - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
165+ # - prefer_relative_imports # not yet tested
156166 - prefer_single_quotes
157167 - prefer_spread_collections
158168 - prefer_typing_uninitialized_variables
@@ -173,6 +183,7 @@ linter:
173183 # - unnecessary_await_in_return # not yet tested
174184 - unnecessary_brace_in_string_interps
175185 - unnecessary_const
186+ # - unnecessary_final # conflicts with prefer_final_locals
176187 - unnecessary_getters_setters
177188 # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
178189 - unnecessary_new
@@ -181,14 +192,16 @@ linter:
181192 - unnecessary_overrides
182193 - unnecessary_parenthesis
183194 - unnecessary_statements
195+ # - unnecessary_string_interpolations
184196 - unnecessary_this
185197 - unrelated_type_equality_checks
186198 # - unsafe_html # not yet tested
187199 - use_full_hex_values_for_flutter_colors
188200 # - use_function_type_syntax_for_parameters # not yet tested
201+ # - use_key_in_widget_constructors # not yet tested
189202 - use_rethrow_when_possible
190203 # - use_setters_to_change_properties # not yet tested
191204 # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
192205 # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
193206 - valid_regexps
194- # - void_checks # not yet tested
207+ - void_checks
0 commit comments