Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 1 | # Specify analysis options. |
| 2 | # |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 3 | # This file is a copy of analysis_options.yaml from flutter repo |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 4 | # as of 2023-12-18, but with some modifications marked with |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 5 | # "DIFFERENT FROM FLUTTER/FLUTTER" below. The file is expected to |
| 6 | # be kept in sync with the master file from the flutter repo. |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 7 | |
| 8 | analyzer: |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 9 | language: |
stuartmorgan | ab62689 | 2023-01-31 12:11:36 -0800 | [diff] [blame] | 10 | strict-casts: true |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 11 | strict-inference: true |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 12 | strict-raw-types: true |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 13 | errors: |
Matan Lurey | a864254 | 2024-02-14 04:19:26 -0800 | [diff] [blame] | 14 | # allow deprecated members (we do this because otherwise we have to annotate |
| 15 | # every member in every test, assert, etc, when we or the Dart SDK deprecates |
| 16 | # something (https://github.com/flutter/flutter/issues/143312) |
| 17 | deprecated_member_use: ignore |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 18 | deprecated_member_use_from_same_package: ignore |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 19 | exclude: # DIFFERENT FROM FLUTTER/FLUTTER |
Maurice Parrish | 4eda7ad | 2022-04-14 07:19:47 -0700 | [diff] [blame] | 20 | # Ignore generated files |
stuartmorgan | 2d48415 | 2023-01-31 15:25:20 -0800 | [diff] [blame] | 21 | - '**/*.g.dart' |
Maurice Parrish | 4eda7ad | 2022-04-14 07:19:47 -0700 | [diff] [blame] | 22 | - '**/*.mocks.dart' # Mockito @GenerateMocks |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 23 | |
| 24 | linter: |
| 25 | rules: |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 26 | # This list is derived from the list of all available lints located at |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 27 | # https://github.com/dart-lang/linter/blob/main/example/all.yaml |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 28 | - always_declare_return_types |
| 29 | - always_put_control_body_on_new_line |
| 30 | # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 31 | - always_specify_types |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 32 | # - always_use_package_imports # we do this commonly |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 33 | - annotate_overrides |
| 34 | # - avoid_annotating_with_dynamic # conflicts with always_specify_types |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 35 | - avoid_bool_literals_in_conditional_expressions |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 36 | # - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023 |
| 37 | # - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023 |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 38 | # - avoid_classes_with_only_static_members # we do this commonly for `abstract final class`es |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 39 | - avoid_double_and_int_checks |
| 40 | - avoid_dynamic_calls |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 41 | - avoid_empty_else |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 42 | - avoid_equals_and_hash_code_on_mutable_classes |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 43 | - avoid_escaping_inner_quotes |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 44 | - avoid_field_initializers_in_const_classes |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 45 | # - avoid_final_parameters # incompatible with prefer_final_parameters |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 46 | - avoid_function_literals_in_foreach_calls |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 47 | # - avoid_implementing_value_types # see https://github.com/dart-lang/linter/issues/4558 |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 48 | - avoid_init_to_null |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 49 | - avoid_js_rounded_ints |
| 50 | # - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 51 | - avoid_null_checks_in_equality_operators |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 52 | # - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it |
| 53 | - avoid_print |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 54 | # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356) |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 55 | - avoid_redundant_argument_values |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 56 | - avoid_relative_lib_imports |
| 57 | - avoid_renaming_method_parameters |
| 58 | - avoid_return_types_on_setters |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 59 | - avoid_returning_null_for_void |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 60 | # - avoid_returning_this # there are enough valid reasons to return `this` that this lint ends up with too many false positives |
| 61 | - avoid_setters_without_getters |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 62 | - avoid_shadowing_type_parameters |
| 63 | - avoid_single_cascade_in_expression_statements |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 64 | - avoid_slow_async_io |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 65 | - avoid_type_to_string |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 66 | - avoid_types_as_parameter_names |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 67 | # - avoid_types_on_closure_parameters # conflicts with always_specify_types |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 68 | - avoid_unnecessary_containers |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 69 | - avoid_unused_constructor_parameters |
| 70 | - avoid_void_async |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 71 | # - avoid_web_libraries_in_flutter # we use web libraries in web-specific code, and our tests prevent us from using them elsewhere |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 72 | - await_only_futures |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 73 | - camel_case_extensions |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 74 | - camel_case_types |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 75 | - cancel_subscriptions |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 76 | # - cascade_invocations # doesn't match the typical style of this repo |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 77 | - cast_nullable_to_non_nullable |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 78 | # - close_sinks # not reliable enough |
Kevin Moore | 06cd9e9 | 2023-09-12 17:37:24 -0700 | [diff] [blame] | 79 | - collection_methods_unrelated_type |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 80 | - combinators_ordering |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 81 | # - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142 |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 82 | - conditional_uri_does_not_exist |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 83 | # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204 |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 84 | - control_flow_in_finally |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 85 | - curly_braces_in_flow_control_structures |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 86 | - dangling_library_doc_comments |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 87 | - depend_on_referenced_packages |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 88 | - deprecated_consistency |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 89 | # - deprecated_member_use_from_same_package # we allow self-references to deprecated members |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 90 | # - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib) |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 91 | - directives_ordering |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 92 | # - discarded_futures # too many false positives, similar to unawaited_futures |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 93 | # - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 94 | - empty_catches |
| 95 | - empty_constructor_bodies |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 96 | - empty_statements |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 97 | - eol_at_end_of_file |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 98 | - exhaustive_cases |
| 99 | - file_names |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 100 | - flutter_style_todos |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 101 | - hash_and_equals |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 102 | - implementation_imports |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 103 | - implicit_call_tearoffs |
| 104 | - implicit_reopen |
| 105 | - invalid_case_patterns |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 106 | # - join_return_with_assignment # not required by flutter style |
| 107 | - leading_newlines_in_multiline_strings |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 108 | - library_annotations |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 109 | - library_names |
| 110 | - library_prefixes |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 111 | - library_private_types_in_public_api |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 112 | # - lines_longer_than_80_chars # not required by flutter style |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 113 | - literal_only_boolean_expressions |
| 114 | # - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509 |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 115 | - missing_whitespace_between_adjacent_strings |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 116 | - no_adjacent_strings_in_list |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 117 | - no_default_cases |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 118 | - no_duplicate_case_values |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 119 | - no_leading_underscores_for_library_prefixes |
| 120 | - no_leading_underscores_for_local_identifiers |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 121 | - no_literal_bool_comparisons |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 122 | - no_logic_in_create_state |
stuartmorgan | 2e4224e | 2023-01-31 16:17:56 -0800 | [diff] [blame] | 123 | - no_runtimeType_toString # DIFFERENT FROM FLUTTER/FLUTTER |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 124 | - no_self_assignments |
| 125 | - no_wildcard_variable_uses |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 126 | - non_constant_identifier_names |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 127 | - noop_primitive_operations |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 128 | - null_check_on_nullable_type_parameter |
| 129 | - null_closures |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 130 | # - omit_local_variable_types # opposite of always_specify_types |
| 131 | # - one_member_abstracts # too many false positives |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 132 | - only_throw_errors # this does get disabled in a few places where we have legacy code that uses strings et al |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 133 | - overridden_fields |
Parker Lougheed | bf751e6 | 2024-10-14 13:47:10 -0500 | [diff] [blame] | 134 | # - package_api_docs # Deprecated (https://github.com/dart-lang/linter/issues/5107) |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 135 | - package_names |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 136 | - package_prefixed_library_names |
| 137 | # - parameter_assignments # we do this commonly |
| 138 | - prefer_adjacent_string_concatenation |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 139 | - prefer_asserts_in_initializer_lists |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 140 | # - prefer_asserts_with_message # not required by flutter style |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 141 | - prefer_collection_literals |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 142 | - prefer_conditional_assignment |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 143 | - prefer_const_constructors |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 144 | - prefer_const_constructors_in_immutables |
| 145 | - prefer_const_declarations |
| 146 | - prefer_const_literals_to_create_immutables |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 147 | # - prefer_constructors_over_static_methods # far too many false positives |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 148 | - prefer_contains |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 149 | # - prefer_double_quotes # opposite of prefer_single_quotes |
stuartmorgan | 5cc71d0 | 2024-05-26 08:47:23 -0400 | [diff] [blame] | 150 | # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#consider-using--for-short-functions-and-methods |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 151 | - prefer_final_fields |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 152 | - prefer_final_in_for_each |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 153 | - prefer_final_locals |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 154 | # - prefer_final_parameters # adds too much verbosity |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 155 | - prefer_for_elements_to_map_fromIterable |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 156 | - prefer_foreach |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 157 | - prefer_function_declarations_over_variables |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 158 | - prefer_generic_function_type_aliases |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 159 | - prefer_if_elements_to_conditional_expressions |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 160 | - prefer_if_null_operators |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 161 | - prefer_initializing_formals |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 162 | - prefer_inlined_adds |
stuartmorgan | 5cc71d0 | 2024-05-26 08:47:23 -0400 | [diff] [blame] | 163 | # - prefer_int_literals # conflicts with https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#use-double-literals-for-double-constants |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 164 | - prefer_interpolation_to_compose_strings |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 165 | - prefer_is_empty |
| 166 | - prefer_is_not_empty |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 167 | - prefer_is_not_operator |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 168 | - prefer_iterable_whereType |
stuartmorgan | 09205ca | 2024-01-08 17:15:14 -0800 | [diff] [blame] | 169 | - prefer_mixin |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 170 | # - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 171 | - prefer_null_aware_operators |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 172 | - prefer_relative_imports |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 173 | - prefer_single_quotes |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 174 | - prefer_spread_collections |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 175 | - prefer_typing_uninitialized_variables |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 176 | - prefer_void_to_null |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 177 | - provide_deprecation_message |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 178 | - public_member_api_docs # DIFFERENT FROM FLUTTER/FLUTTER |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 179 | - recursive_getters |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 180 | # - 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 |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 181 | - secure_pubspec_urls |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 182 | - sized_box_for_whitespace |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 183 | - sized_box_shrink_expand |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 184 | - slash_for_doc_comments |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 185 | - sort_child_properties_last |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 186 | - sort_constructors_first |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 187 | - sort_pub_dependencies # DIFFERENT FROM FLUTTER/FLUTTER: Flutter's use case for not sorting does not apply to this repository. |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 188 | - sort_unnamed_constructors_first |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 189 | - test_types_in_equals |
| 190 | - throw_in_finally |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 191 | - tighten_type_of_initializing_formals |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 192 | # - type_annotate_public_apis # subset of always_specify_types |
| 193 | - type_init_formals |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 194 | - type_literal_in_constant_pattern |
stuartmorgan | 97e3ba6 | 2023-05-24 08:39:26 -0700 | [diff] [blame] | 195 | - 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. |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 196 | - unnecessary_await_in_return |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 197 | - unnecessary_brace_in_string_interps |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 198 | - unnecessary_breaks |
Alexandre Ardhuin | 14ff267 | 2018-10-05 22:52:16 +0200 | [diff] [blame] | 199 | - unnecessary_const |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 200 | - unnecessary_constructor_name |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 201 | # - unnecessary_final # conflicts with prefer_final_locals |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 202 | - unnecessary_getters_setters |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 203 | # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498 |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 204 | - unnecessary_late |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 205 | - unnecessary_library_directive |
Alexandre Ardhuin | 14ff267 | 2018-10-05 22:52:16 +0200 | [diff] [blame] | 206 | - unnecessary_new |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 207 | - unnecessary_null_aware_assignments |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 208 | - unnecessary_null_aware_operator_on_extension_on_nullable |
| 209 | - unnecessary_null_checks |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 210 | - unnecessary_null_in_if_null_operators |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 211 | - unnecessary_nullable_for_final_variable_declarations |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 212 | - unnecessary_overrides |
| 213 | - unnecessary_parenthesis |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 214 | # - unnecessary_raw_strings # what's "necessary" is a matter of opinion; consistency across strings can help readability more than this lint |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 215 | - unnecessary_statements |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 216 | - unnecessary_string_escapes |
| 217 | - unnecessary_string_interpolations |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 218 | - unnecessary_this |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 219 | - unnecessary_to_list_in_spreads |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 220 | - unreachable_from_main |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 221 | - unrelated_type_equality_checks |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 222 | - unsafe_html |
| 223 | - use_build_context_synchronously |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 224 | - use_colored_box |
| 225 | # - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding) |
| 226 | - use_enums |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 227 | - use_full_hex_values_for_flutter_colors |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 228 | - use_function_type_syntax_for_parameters |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 229 | - use_if_null_to_convert_nulls_to_bools |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 230 | - use_is_even_rather_than_modulo |
| 231 | - use_key_in_widget_constructors |
| 232 | - use_late_for_private_fields_and_variables |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 233 | - use_named_constants |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 234 | - use_raw_strings |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 235 | - use_rethrow_when_possible |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 236 | - use_setters_to_change_properties |
Michael Goderbauer | 053ed44 | 2019-08-28 10:52:29 -0700 | [diff] [blame] | 237 | # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182 |
Michael Goderbauer | bb97da8 | 2024-01-03 15:16:49 -0800 | [diff] [blame] | 238 | - use_string_in_part_of_directives |
Michael Goderbauer | 88585ef | 2022-08-25 09:57:05 -0700 | [diff] [blame] | 239 | - use_super_parameters |
| 240 | - use_test_throws_matchers |
Yegor Jbanov | 2894fd8 | 2017-08-01 14:58:30 -0700 | [diff] [blame] | 241 | # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review |
Greg Spencer | 70de3f6 | 2018-06-15 11:14:21 -0700 | [diff] [blame] | 242 | - valid_regexps |
Michael Goderbauer | a164beb | 2021-03-11 13:40:43 -0800 | [diff] [blame] | 243 | - void_checks |