forked from SpinlockLabs/github.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
397 lines (298 loc) · 15.9 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
include: package:lints/recommended.yaml
analyzer:
strong-mode:
implicit-casts: true
implicit-dynamic: true
linter:
rules:
# Separate the control structure expression from its statement.
# http://dart-lang.github.io/linter/lints/always_put_control_body_on_new_line.html
- always_put_control_body_on_new_line
# Put @required named parameters first.
# http://dart-lang.github.io/linter/lints/always_put_required_named_parameters_first.html
- always_put_required_named_parameters_first
# Avoid bool literals in conditional expressions.
# http://dart-lang.github.io/linter/lints/avoid_bool_literals_in_conditional_expressions.html
# - avoid_bool_literals_in_conditional_expressions
# Don't explicitly catch Error or types that implement it.
# http://dart-lang.github.io/linter/lints/avoid_catching_errors.html
- avoid_catching_errors
# Avoid defining a class that contains only static members.
# http://dart-lang.github.io/linter/lints/avoid_classes_with_only_static_members.html
- avoid_classes_with_only_static_members
# Avoid double and int checks.
# http://dart-lang.github.io/linter/lints/avoid_double_and_int_checks.html
- avoid_double_and_int_checks
# Avoid field initializers in const classes.
# http://dart-lang.github.io/linter/lints/avoid_field_initializers_in_const_classes.html
- avoid_field_initializers_in_const_classes
# Avoid using `forEach` with a function literal.
# http://dart-lang.github.io/linter/lints/avoid_function_literals_in_foreach_calls.html
# reason: Use for (x in y) or forEach(someFunc) instead
# - avoid_function_literals_in_foreach_calls
# Don't implement classes that override `==`.
# http://dart-lang.github.io/linter/lints/avoid_implementing_value_types.html
- avoid_implementing_value_types
# Avoid JavaScript rounded ints.
# http://dart-lang.github.io/linter/lints/avoid_js_rounded_ints.html
- avoid_js_rounded_ints
# Avoid positional boolean parameters.
# http://dart-lang.github.io/linter/lints/avoid_positional_boolean_parameters.html
# - avoid_positional_boolean_parameters
# Avoid `print` calls in production code.
# http://dart-lang.github.io/linter/lints/avoid_print.html
# - avoid_print
# Avoid private typedef functions.
# http://dart-lang.github.io/linter/lints/avoid_private_typedef_functions.html
- avoid_private_typedef_functions
# Don't rename parameters of overridden methods.
# http://dart-lang.github.io/linter/lints/avoid_renaming_method_parameters.html
# - avoid_renaming_method_parameters
# Avoid returning null from members whose return type is bool, double, int, or num.
# http://dart-lang.github.io/linter/lints/avoid_returning_null.html
- avoid_returning_null
# Avoid returning null for Future.
# http://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html
- avoid_returning_null_for_future
# Avoid returning null for void.
# http://dart-lang.github.io/linter/lints/avoid_returning_null_for_void.html
- avoid_returning_null_for_void
# Avoid returning this from methods just to enable a fluent interface.
# http://dart-lang.github.io/linter/lints/avoid_returning_this.html
- avoid_returning_this
# Avoid setters without getters.
# http://dart-lang.github.io/linter/lints/avoid_setters_without_getters.html
- avoid_setters_without_getters
# Avoid single cascade in expression statements.
# http://dart-lang.github.io/linter/lints/avoid_single_cascade_in_expression_statements.html
- avoid_single_cascade_in_expression_statements
# Avoid slow async `dart:io` methods.
# http://dart-lang.github.io/linter/lints/avoid_slow_async_io.html
- avoid_slow_async_io
# Avoid defining unused parameters in constructors.
# http://dart-lang.github.io/linter/lints/avoid_unused_constructor_parameters.html
- avoid_unused_constructor_parameters
# Avoid async functions that return void.
# http://dart-lang.github.io/linter/lints/avoid_void_async.html
- avoid_void_async
# Await only futures.
# http://dart-lang.github.io/linter/lints/await_only_futures.html
- await_only_futures
# Name types using UpperCamelCase.
# http://dart-lang.github.io/linter/lints/camel_case_types.html
- camel_case_types
# Cancel instances of dart.async.StreamSubscription.
# http://dart-lang.github.io/linter/lints/cancel_subscriptions.html
- cancel_subscriptions
# Cascade consecutive method invocations on the same reference.
# http://dart-lang.github.io/linter/lints/cascade_invocations.html
# - cascade_invocations
# Close instances of `dart.core.Sink`.
# http://dart-lang.github.io/linter/lints/close_sinks.html
- close_sinks
# Only reference in scope identifiers in doc comments.
# http://dart-lang.github.io/linter/lints/comment_references.html
- comment_references
# Avoid control flow in finally blocks.
# http://dart-lang.github.io/linter/lints/control_flow_in_finally.html
- control_flow_in_finally
# DO reference all public properties in debug methods.
# http://dart-lang.github.io/linter/lints/diagnostic_describe_all_properties.html
- diagnostic_describe_all_properties
# Adhere to Effective Dart Guide directives sorting conventions.
# http://dart-lang.github.io/linter/lints/directives_ordering.html
- directives_ordering
# Avoid empty statements.
# http://dart-lang.github.io/linter/lints/empty_statements.html
- empty_statements
# Name source files using `lowercase_with_underscores`.
# http://dart-lang.github.io/linter/lints/file_names.html
- file_names
# Use Flutter TODO format: // TODO(username): message, https://URL-to-issue.
# http://dart-lang.github.io/linter/lints/flutter_style_todos.html
# - flutter_style_todos
# Always override `hashCode` if overriding `==`.
# http://dart-lang.github.io/linter/lints/hash_and_equals.html
- hash_and_equals
# Don't import implementation files from another package.
# http://dart-lang.github.io/linter/lints/implementation_imports.html
- implementation_imports
# Conditions should not unconditionally evaluate to `true` or to `false`.
# http://dart-lang.github.io/linter/lints/invariant_booleans.html
# reason: There are several outstanding bugs with this lint that cause a good deal of noise
- invariant_booleans
# Invocation of Iterable<E>.contains with references of unrelated types.
# http://dart-lang.github.io/linter/lints/iterable_contains_unrelated_type.html
- iterable_contains_unrelated_type
# Join return statement with assignment when possible.
# http://dart-lang.github.io/linter/lints/join_return_with_assignment.html
- join_return_with_assignment
# AVOID lines longer than 80 characters.
# http://dart-lang.github.io/linter/lints/lines_longer_than_80_chars.html
# - lines_longer_than_80_chars
# Invocation of `remove` with references of unrelated types.
# http://dart-lang.github.io/linter/lints/list_remove_unrelated_type.html
- list_remove_unrelated_type
# Boolean expression composed only with literals.
# http://dart-lang.github.io/linter/lints/literal_only_boolean_expressions.html
- literal_only_boolean_expressions
# Don't use adjacent strings in list.
# http://dart-lang.github.io/linter/lints/no_adjacent_strings_in_list.html
- no_adjacent_strings_in_list
# Name non-constant identifiers using lowerCamelCase.
# http://dart-lang.github.io/linter/lints/non_constant_identifier_names.html
- non_constant_identifier_names
# Avoid defining a one-member abstract class when a simple function will do.
# http://dart-lang.github.io/linter/lints/one_member_abstracts.html
- one_member_abstracts
# Only throw instances of classes extending either Exception or Error.
# http://dart-lang.github.io/linter/lints/only_throw_errors.html
- only_throw_errors
# Don't override fields.
# http://dart-lang.github.io/linter/lints/overridden_fields.html
- overridden_fields
# Provide doc comments for all public APIs.
# http://dart-lang.github.io/linter/lints/package_api_docs.html
- package_api_docs
# Use `lowercase_with_underscores` for package names.
# http://dart-lang.github.io/linter/lints/package_names.html
- package_names
# Prefix library names with the package name and a dot-separated path.
# http://dart-lang.github.io/linter/lints/package_prefixed_library_names.html
- package_prefixed_library_names
# Don't reassign references to parameters of functions or methods.
# http://dart-lang.github.io/linter/lints/parameter_assignments.html
# - parameter_assignments
# Prefer putting asserts in initializer list.
# http://dart-lang.github.io/linter/lints/prefer_asserts_in_initializer_lists.html
- prefer_asserts_in_initializer_lists
# Prefer asserts with message.
# http://dart-lang.github.io/linter/lints/prefer_asserts_with_message.html
# - prefer_asserts_with_message
# Prefer using a boolean as the assert condition.
# http://dart-lang.github.io/linter/lints/prefer_bool_in_asserts.html
# reason: This lint rule has been deprecated
# - prefer_bool_in_asserts
# Prefer using `??=` over testing for null.
# http://dart-lang.github.io/linter/lints/prefer_conditional_assignment.html
# - prefer_conditional_assignment
# Prefer const with constant constructors.
# http://dart-lang.github.io/linter/lints/prefer_const_constructors.html
- prefer_const_constructors
# Prefer declare const constructors on `@immutable` classes.
# http://dart-lang.github.io/linter/lints/prefer_const_constructors_in_immutables.html
- prefer_const_constructors_in_immutables
# Prefer const over final for declarations.
# http://dart-lang.github.io/linter/lints/prefer_const_declarations.html
- prefer_const_declarations
# Prefer const literals as parameters of constructors on @immutable classes.
# http://dart-lang.github.io/linter/lints/prefer_const_literals_to_create_immutables.html
- prefer_const_literals_to_create_immutables
# Prefer defining constructors instead of static methods to create instances.
# http://dart-lang.github.io/linter/lints/prefer_constructors_over_static_methods.html
- prefer_constructors_over_static_methods
# Prefer final in for-each loop variable if reference is not reassigned.
# http://dart-lang.github.io/linter/lints/prefer_final_in_for_each.html
- prefer_final_in_for_each
# Use `forEach` to only apply a function to all the elements.
# http://dart-lang.github.io/linter/lints/prefer_foreach.html
- prefer_foreach
# Use a function declaration to bind a function to a name.
# http://dart-lang.github.io/linter/lints/prefer_function_declarations_over_variables.html
- prefer_function_declarations_over_variables
# Prefer if elements to conditional expressions where possible.
# http://dart-lang.github.io/linter/lints/prefer_if_elements_to_conditional_expressions.html
- prefer_if_elements_to_conditional_expressions
# Use initializing formals when possible.
# http://dart-lang.github.io/linter/lints/prefer_initializing_formals.html
- prefer_initializing_formals
# Inline list item declarations where possible.
# http://dart-lang.github.io/linter/lints/prefer_inlined_adds.html
- prefer_inlined_adds
# Prefer int literals over double literals.
# http://dart-lang.github.io/linter/lints/prefer_int_literals.html
- prefer_int_literals
# Prefer using mixins.
# http://dart-lang.github.io/linter/lints/prefer_mixin.html
- prefer_mixin
# Prefer typing uninitialized variables and fields.
# http://dart-lang.github.io/linter/lints/prefer_typing_uninitialized_variables.html
- prefer_typing_uninitialized_variables
# Don't use the Null type, unless you are positive that you don't want void.
# http://dart-lang.github.io/linter/lints/prefer_void_to_null.html
- prefer_void_to_null
# Provide a deprecation message, via @Deprecated("message").
# http://dart-lang.github.io/linter/lints/provide_deprecation_message.html
- provide_deprecation_message
# Document all public members.
# http://dart-lang.github.io/linter/lints/public_member_api_docs.html
# reason: Can get annoying for React component lifecycle methods, constructors.
# - public_member_api_docs
# Sort child properties last in widget instance creations.
# http://dart-lang.github.io/linter/lints/sort_child_properties_last.html
- sort_child_properties_last
# Sort constructor declarations before other members.
# http://dart-lang.github.io/linter/lints/sort_constructors_first.html
# - sort_constructors_first
# Sort pub dependencies.
# http://dart-lang.github.io/linter/lints/sort_pub_dependencies.html
- sort_pub_dependencies
# Sort unnamed constructor declarations first.
# http://dart-lang.github.io/linter/lints/sort_unnamed_constructors_first.html
- sort_unnamed_constructors_first
# Test type arguments in operator ==(Object other).
# http://dart-lang.github.io/linter/lints/test_types_in_equals.html
- test_types_in_equals
# Avoid `throw` in finally block.
# http://dart-lang.github.io/linter/lints/throw_in_finally.html
- throw_in_finally
# Type annotate public APIs.
# http://dart-lang.github.io/linter/lints/type_annotate_public_apis.html
# reason: React component render() method can return either ReactElement or false. Use overrides.
- type_annotate_public_apis
# Unnecessary await keyword in return.
# http://dart-lang.github.io/linter/lints/unnecessary_await_in_return.html
- unnecessary_await_in_return
# Avoid using braces in interpolation when not needed.
# http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interps.html
- unnecessary_brace_in_string_interps
# Avoid wrapping fields in getters and setters just to be "safe".
# http://dart-lang.github.io/linter/lints/unnecessary_getters_setters.html
- unnecessary_getters_setters
# Don't create a lambda when a tear-off will do.
# http://dart-lang.github.io/linter/lints/unnecessary_lambdas.html
- unnecessary_lambdas
# Avoid null in null-aware assignment.
# http://dart-lang.github.io/linter/lints/unnecessary_null_aware_assignments.html
- unnecessary_null_aware_assignments
# Don't override a method to do a super method invocation with the same parameters.
# http://dart-lang.github.io/linter/lints/unnecessary_overrides.html
- unnecessary_overrides
# Unnecessary parenthesis can be removed.
# http://dart-lang.github.io/linter/lints/unnecessary_parenthesis.html
- unnecessary_parenthesis
# Avoid using unnecessary statements.
# http://dart-lang.github.io/linter/lints/unnecessary_statements.html
- unnecessary_statements
# Avoid unsafe HTML APIs.
# http://dart-lang.github.io/linter/lints/unsafe_html.html
# - unsafe_html
# Prefer an 8-digit hexadecimal integer(0xFFFFFFFF) to instantiate Color.
# http://dart-lang.github.io/linter/lints/use_full_hex_values_for_flutter_colors.html
- use_full_hex_values_for_flutter_colors
# Use a setter for operations that conceptually change a property.
# http://dart-lang.github.io/linter/lints/use_setters_to_change_properties.html
- use_setters_to_change_properties
# Use string buffers to compose strings.
# http://dart-lang.github.io/linter/lints/use_string_buffers.html
- use_string_buffers
# Start the name of the method with to/_to or as/_as if applicable.
# http://dart-lang.github.io/linter/lints/use_to_and_as_if_applicable.html
- use_to_and_as_if_applicable
# Don't assign to void.
# http://dart-lang.github.io/linter/lints/void_checks.html
# reason: Trying to assigning a value to void is an error.
- void_checks
- omit_local_variable_types
- prefer_final_fields
- use_function_type_syntax_for_parameters