-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
214 lines (212 loc) · 11 KB
/
analysis_options.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# This is a copy from
# extra_pedantic (https://github.com/modulovalue/extra_pedantic) with some
# options removed, because they were too pedantic.
# Keep an eye on extra_pedantic updates and update this file accordingly.
analyzer:
strong-mode:
# https://github.com/dart-lang/language/tree/master/resources/type-system
implicit-casts: false
implicit-dynamic: false
language:
# https://github.com/dart-lang/language/tree/master/resources/type-system
strict-inference: true
strict-raw-types: true
# TODO enable once 2.16.0 isn't new anymore.
# strict-casts: true
# enable-experiment:
# https://github.com/dart-lang/sdk/blob/main/tools/experimental_features.yaml
linter:
# All rules: https://github.com/dart-lang/linter/blob/master/example/all.yaml
rules:
- always_declare_return_types # No comment.
- annotate_overrides # No comment.
- avoid_null_checks_in_equality_operators # No comment.
- prefer_collection_literals # No comment.
- prefer_conditional_assignment # No comment.
- prefer_final_fields # No comment.
- prefer_for_elements_to_map_fromIterable # No comment.
- prefer_generic_function_type_aliases # No comment.
- prefer_if_null_operators # No comment.
- prefer_spread_collections # No comment.
- use_function_type_syntax_for_parameters # No comment.
- avoid_empty_else # No comment.
- avoid_init_to_null # No comment.
- avoid_relative_lib_imports # No comment.
- avoid_return_types_on_setters # No comment.
- avoid_shadowing_type_parameters # No comment.
- avoid_types_as_parameter_names # No comment.
- curly_braces_in_flow_control_structures # No comment.
- empty_catches # No comment.
- empty_constructor_bodies # No comment.
- library_names # No comment.
- library_prefixes # No comment.
- no_duplicate_case_values # No comment.
- null_closures # No comment.
- prefer_contains # No comment.
- prefer_equal_for_default_values # No comment.
- prefer_is_empty # No comment.
- prefer_is_not_empty # No comment.
- prefer_iterable_whereType # No comment.
- recursive_getters # No comment.
- slash_for_doc_comments # No comment.
- type_init_formals # No comment.
- unawaited_futures # No comment.
- unnecessary_const # No comment.
- unnecessary_new # No comment.
- unnecessary_null_in_if_null_operators # No comment.
- unrelated_type_equality_checks # No comment.
- use_rethrow_when_possible # No comment.
- valid_regexps # No comment.
- control_flow_in_finally # No comment.
- empty_statements # No comment.
- prefer_final_locals # No comment.
- throw_in_finally # No comment.
- await_only_futures # No comment.
- cancel_subscriptions # No comment.
- close_sinks # No comment.
- hash_and_equals # No comment.
- implementation_imports # No comment.
- package_api_docs # No comment.
- package_names # No comment.
- package_prefixed_library_names # No comment.
- test_types_in_equals # No comment.
- unnecessary_getters_setters # No comment.
- void_checks # No comment.
- type_annotate_public_apis # No comment.
- avoid_slow_async_io # No comment.
- invariant_booleans # No comment.
- iterable_contains_unrelated_type # No comment.
- list_remove_unrelated_type # No comment.
- literal_only_boolean_expressions # No comment.
- no_adjacent_strings_in_list # No comment.
- directives_ordering # No comment.
- only_throw_errors # No comment.
- prefer_asserts_in_initializer_lists # No comment.
- prefer_const_constructors # No comment.
- prefer_const_constructors_in_immutables # No comment.
- prefer_typing_uninitialized_variables # No comment.
- unnecessary_null_aware_assignments # No comment.
- unnecessary_overrides # No comment.
- use_string_buffers # No comment.
- use_full_hex_values_for_flutter_colors # No comment.
- prefer_inlined_adds # No comment.
- unnecessary_parenthesis # No comment.
- prefer_const_declarations # No comment.
- prefer_null_aware_operators # No comment.
- always_put_required_named_parameters_first # No comment.
- avoid_catching_errors # No comment.
- avoid_double_and_int_checks # No comment.
- avoid_implementing_value_types # No comment.
- avoid_js_rounded_ints # No comment.
- avoid_returning_null_for_future # No comment.
- avoid_returning_null_for_void # No comment.
- avoid_returning_this # No comment.
- avoid_single_cascade_in_expression_statements # No comment.
- avoid_unused_constructor_parameters # No comment.
- avoid_void_async # No comment.
- join_return_with_assignment # No comment.
- parameter_assignments # No comment.
- prefer_final_in_for_each # No comment.
- prefer_initializing_formals # No comment.
- provide_deprecation_message # No comment.
- sort_pub_dependencies # No comment.
- sort_unnamed_constructors_first # No comment.
- unnecessary_await_in_return # No comment.
- unsafe_html # No comment.
- file_names # No comment.
- cast_nullable_to_non_nullable # No comment.
- exhaustive_cases # No comment.
- prefer_relative_imports # With imports don't have to depend on the package name.
- tighten_type_of_initializing_formals # No comment.
- avoid_dynamic_calls # No comment.
# - avoid_catches_without_on_clauses # No comment. Disabled for Appella.
- avoid_type_to_string # No comment.
- avoid_web_libraries_in_flutter # No comment.
# - no_default_cases # No comment. # Disabled for Appella because it is still experimental and not really beautiful to fix yet.
- no_logic_in_create_state # No comment.
- overridden_fields # No comment.
# - prefer_asserts_with_message # No comment. # Disabled for Appella because there are simple cases where this is not necessary.
- prefer_mixin # No comment.
- prefer_null_aware_method_calls # No comment.
- sized_box_for_whitespace # No comment.
- unnecessary_nullable_for_final_variable_declarations # No comment.
- unnecessary_statements # No comment.
- use_build_context_synchronously # No comment.
- use_is_even_rather_than_modulo # No comment.
- comment_references # No comment.
- noop_primitive_operations # No comment.
# - prefer_final_parameters # This makes it easier to refactor code. TODO(saibotma): Enable again on extra branch.
# - avoid_multiple_declarations_per_line # Has false positives.
# - avoid_private_typedef_functions # Too pedantic.
# - avoid_final_parameters # No comment.
# - avoid_returning_null # Obsolete because of NNBD.
# - prefer_if_elements_to_conditional_expressions # Disabled because this rule decreases productivity by disturbing flow.
# - prefer_foreach # Disabled because this rule decreases productivity by disturbing flow.
# - always_require_non_null_named_parameters # Obsolete because of NNBD.
# - prefer_void_to_null # Obsolete because of NNBD.
# - camel_case_extensions # Disabled because an underscore is useful to represent domain separation in generated code.
# - omit_local_variable_types # Too pedantic.
# - prefer_adjacent_string_concatenation # No comment.
# - prefer_single_quotes # Too pedantic.
# - always_put_control_body_on_new_line # Too pedantic.
# - always_specify_types # Too pedantic.
# - avoid_as # Too pedantic.
# - unnecessary_this # Too many false positives.
# - prefer_bool_in_asserts # No comment.
# - use_to_and_as_if_applicable # Too pedantic.
# - sort_child_properties_last # Too pedantic.
# - prefer_function_declarations_over_variables # With variables, the return type can be omitted safely which is useful in FP-style code.
# - always_use_package_imports # Prefer relative imports
# - avoid_annotating_with_dynamic # It is better to always be explicit about dynamic.
# - avoid_bool_literals_in_conditional_expressions # bool literals in conditional expressions make it easier to reason about them. X ? Y : Z is easier for humans than e.g. X || Z
# - avoid_classes_with_only_static_members # Classes with static members don't pollute the global namespace.
# - avoid_escaping_inner_quotes # Too pedantic.
# - avoid_function_literals_in_foreach_calls # Great lint, but if you worry about the memory overhead of closures you should probably switch to Rust.
# - avoid_equals_and_hash_code_on_mutable_classes # @immutable needs a dependency on meta.
# - avoid_positional_boolean_parameters # Too pedantic.
# - avoid_print # Too pedantic.
# - avoid_redundant_argument_values # Too pedantic.
# - avoid_renaming_method_parameters # Too pedantic.
# - avoid_setters_without_getters # Too pedantic.
# - avoid_types_on_closure_parameters # Too pedantic.
# - avoid_unnecessary_containers # Disabled because this rule decreases productivity by disturbing flow.
# - camel_case_types # Underscores can be useful in generated code.
# - cascade_invocations # Too pedantic.
# - constant_identifier_names # Too pedantic.
# - deprecated_consistency # Too pedantic.
# - diagnostic_describe_all_properties # Too pedantic.
# - flutter_style_todos # Too pedantic.
# - do_not_use_environment # Too pedantic.
# - leading_newlines_in_multiline_strings # Too pedantic.
# - library_private_types_in_public_api # Too pedantic.
# - lines_longer_than_80_chars # Too pedantic.
# - missing_whitespace_between_adjacent_strings # Too pedantic.
# - non_constant_identifier_names # Too pedantic.
# - no_runtimeType_toString # Too pedantic.
# - one_member_abstracts # Too pedantic.
# - prefer_const_literals_to_create_immutables # Too pedantic.
# - prefer_constructors_over_static_methods # Too pedantic.
# - prefer_double_quotes # Too pedantic.
# - prefer_expression_function_bodies # Too pedantic.
# - prefer_interpolation_to_compose_strings # Too pedantic.
# - prefer_int_literals # Too pedantic.
# - prefer_is_not_operator # Too pedantic.
# - public_member_api_docs # Too pedantic.
# - sort_constructors_first # Too pedantic.
# - super_goes_last # Deprecated
# - unnecessary_brace_in_string_interps # Too pedantic.
# - unnecessary_final # final tells the reader 'This variable won't be mutated.'
# - unnecessary_lambdas # In rare cases it is possible for this to introduce bugs.
# - unnecessary_null_checks # Too pedantic.
# - unnecessary_raw_strings # Too pedantic.
# - unnecessary_string_escapes # Too pedantic.
# - unnecessary_string_interpolations # Too pedantic.
# - use_if_null_to_convert_nulls_to_bools # Too pedantic.
# - use_key_in_widget_constructors # Too pedantic.
# - use_late_for_private_fields_and_variables # Too pedantic.
# - use_named_constants # There could be multiple constants with the same value but different identifiers.
# - use_raw_strings # Too pedantic.
# - use_setters_to_change_properties # Too pedantic.
# - null_check_on_nullable_type_parameter # Too many false positives.
# - require_trailing_commas # Too pedantic.
# - avoid_field_initializers_in_const_classes # Too pedantic.