-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
912 lines (685 loc) · 28.2 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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
include: package:flutter_lints/flutter.yaml
analyzer:
exclude: ["build/**"]
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
# always_declare_return_types: error
# always_put_control_body_on_new_line: error
# always_put_required_named_parameters_first: error
# always_specify_types: error
# always_use_package_imports: error
annotate_overrides: error
# annotate_redeclares: error
# avoid_annotating_with_dynamic: error
# avoid_bool_literals_in_conditional_expressions: error
# avoid_catches_without_on_clauses: error
# avoid_catching_errors: error
# avoid_classes_with_only_static_members: error
# avoid_double_and_int_checks: error
# avoid_dynamic_calls: error
avoid_empty_else: error
# avoid_equals_and_hash_code_on_mutable_classes: error
# avoid_escaping_inner_quotes: error
# avoid_field_initializers_in_const_classes: error
# avoid_final_parameters: error
avoid_function_literals_in_foreach_calls: error
# avoid_futureor_void: error
# avoid_implementing_value_types: error
avoid_init_to_null: error
# avoid_js_rounded_ints: error
# avoid_multiple_declarations_per_line: error
# avoid_null_checks_in_equality_operators: error
# avoid_positional_boolean_parameters: error
avoid_print: error
# avoid_private_typedef_functions: error
# avoid_redundant_argument_values: error
avoid_relative_lib_imports: error
avoid_renaming_method_parameters: error
avoid_return_types_on_setters: error
avoid_returning_null_for_void: error
# avoid_returning_this: error
# avoid_setters_without_getters: error
avoid_shadowing_type_parameters: error
avoid_single_cascade_in_expression_statements: error
# avoid_slow_async_io: error
# avoid_type_to_string: error
avoid_types_as_parameter_names: error
# avoid_types_on_closure_parameters: error
avoid_unnecessary_containers: error
# avoid_unused_constructor_parameters: error
# avoid_void_async: error
avoid_web_libraries_in_flutter: error
await_only_futures: error
camel_case_extensions: error
camel_case_types: error
# cancel_subscriptions: error
# cascade_invocations: error
# cast_nullable_to_non_nullable: error
# close_sinks: error
collection_methods_unrelated_type: error
# combinators_ordering: error
# comment_references: error
# conditional_uri_does_not_exist: error
constant_identifier_names: error
control_flow_in_finally: error
curly_braces_in_flow_control_structures: error
dangling_library_doc_comments: error
depend_on_referenced_packages: error
# deprecated_consistency: error
# deprecated_member_use_from_same_package: error
# diagnostic_describe_all_properties: error
# directives_ordering: error
# discarded_futures: error
# do_not_use_environment: error
# document_ignores: error
empty_catches: error
empty_constructor_bodies: error
empty_statements: error
# eol_at_end_of_file: error
exhaustive_cases: error
file_names: error
# flutter_style_todos: error
hash_and_equals: error
implementation_imports: error
implicit_call_tearoffs: error
# implicit_reopen: error
# invalid_case_patterns: error
invalid_runtime_check_with_js_interop_types: error
# join_return_with_assignment: error
# leading_newlines_in_multiline_strings: error
library_annotations: error
# library_names: error
library_prefixes: error
library_private_types_in_public_api: error
# lines_longer_than_80_chars: error
# literal_only_boolean_expressions: error
# matching_super_parameters: error
# missing_code_block_language_in_doc_comment: error
# missing_whitespace_between_adjacent_strings: error
# no_adjacent_strings_in_list: error
# no_default_cases: error
no_duplicate_case_values: error
no_leading_underscores_for_library_prefixes: error
no_leading_underscores_for_local_identifiers: error
# no_literal_bool_comparisons: error
no_logic_in_create_state: error
# no_runtimeType_toString: error
# no_self_assignments: error
no_wildcard_variable_uses: error
non_constant_identifier_names: error
# noop_primitive_operations: error
null_check_on_nullable_type_parameter: error
null_closures: error
# omit_local_variable_types: error
# omit_obvious_local_variable_types: error
# one_member_abstracts: error
# only_throw_errors: error
overridden_fields: error
# package_api_docs: error
package_names: error
# package_prefixed_library_names: error
# parameter_assignments: error
prefer_adjacent_string_concatenation: error
# prefer_asserts_in_initializer_lists: error
# prefer_asserts_with_message: error
prefer_collection_literals: error
prefer_conditional_assignment: error
# prefer_const_constructors: error
prefer_const_constructors_in_immutables: error
# prefer_const_declarations: error
# prefer_const_literals_to_create_immutables: error
# prefer_constructors_over_static_methods: error
prefer_contains: error
# prefer_double_quotes: error
# prefer_expression_function_bodies: error
prefer_final_fields: error
# prefer_final_in_for_each: error
# prefer_final_locals: error
# prefer_final_parameters: error
prefer_for_elements_to_map_fromIterable: error
# prefer_foreach: error
prefer_function_declarations_over_variables: error
prefer_generic_function_type_aliases: error
# prefer_if_elements_to_conditional_expressions: error
prefer_if_null_operators: error
prefer_initializing_formals: error
prefer_inlined_adds: error
# prefer_int_literals: error
prefer_interpolation_to_compose_strings: error
prefer_is_empty: error
prefer_is_not_empty: error
prefer_is_not_operator: error
prefer_iterable_whereType: error
# prefer_mixin: error
# prefer_null_aware_method_calls: error
prefer_null_aware_operators: error
# prefer_relative_imports: error
# prefer_single_quotes: error
prefer_spread_collections: error
prefer_typing_uninitialized_variables: error
# prefer_void_to_null: error
provide_deprecation_message: error
# public_member_api_docs: error
recursive_getters: error
# require_trailing_commas: error
secure_pubspec_urls: error
sized_box_for_whitespace: error
# sized_box_shrink_expand: error
slash_for_doc_comments: error
sort_child_properties_last: error
# sort_constructors_first: error
# sort_pub_dependencies: error
# sort_unnamed_constructors_first: error
# specify_nonobvious_local_variable_types: error
# test_types_in_equals: error
# throw_in_finally: error
# tighten_type_of_initializing_formals: error
# type_annotate_public_apis: error
type_init_formals: error
type_literal_in_constant_pattern: error
# unawaited_futures: error
unintended_html_in_doc_comment: error
# unnecessary_await_in_return: error
unnecessary_brace_in_string_interps: error
# unnecessary_breaks: error
unnecessary_const: error
unnecessary_constructor_name: error
# unnecessary_final: error
unnecessary_getters_setters: error
# unnecessary_lambdas: error
unnecessary_late: error
# unnecessary_library_directive: error
unnecessary_library_name: error
unnecessary_new: error
unnecessary_null_aware_assignments: error
# unnecessary_null_aware_operator_on_extension_on_nullable: error
# unnecessary_null_checks: error
unnecessary_null_in_if_null_operators: error
unnecessary_nullable_for_final_variable_declarations: error
unnecessary_overrides: error
# unnecessary_parenthesis: error
# unnecessary_raw_strings: error
# unnecessary_statements: error
unnecessary_string_escapes: error
unnecessary_string_interpolations: error
unnecessary_this: error
unnecessary_to_list_in_spreads: error
# unreachable_from_main: error
unrelated_type_equality_checks: error
use_build_context_synchronously: error
# use_colored_box: error
# use_decorated_box: error
# use_enums: error
use_full_hex_values_for_flutter_colors: error
use_function_type_syntax_for_parameters: error
# use_if_null_to_convert_nulls_to_bools: error
# use_is_even_rather_than_modulo: error
use_key_in_widget_constructors: error
# use_late_for_private_fields_and_variables: error
# use_named_constants: error
# use_raw_strings: error
use_rethrow_when_possible: error
# use_setters_to_change_properties: error
# use_string_buffers: error
use_string_in_part_of_directives: error
use_super_parameters: error
# use_test_throws_matchers: error
# use_to_and_as_if_applicable: error
# use_truncating_division: error
valid_regexps: error
void_checks: error
linter:
rules:
# Declare method return types.
# - always_declare_return_types
# Separate the control structure expression from its statement.
# - always_put_control_body_on_new_line
# Put required named parameters first.
# - always_put_required_named_parameters_first
# Specify type annotations.
# - always_specify_types
# Avoid relative imports for files in `lib/`.
# - always_use_package_imports
# Annotate overridden members.
- annotate_overrides
# Annotate redeclared members.
# - annotate_redeclares
# Avoid annotating with `dynamic` when not required.
# - avoid_annotating_with_dynamic
# Avoid `bool` literals in conditional expressions.
# - avoid_bool_literals_in_conditional_expressions
# Avoid catches without on clauses.
# - avoid_catches_without_on_clauses
# Don't explicitly catch `Error` or types that implement it.
# - avoid_catching_errors
# Avoid defining a class that contains only static members.
# - avoid_classes_with_only_static_members
# Avoid `double` and `int` checks.
# - avoid_double_and_int_checks
# Avoid method calls or property accesses on a `dynamic` target.
# - avoid_dynamic_calls
# Avoid empty statements in else clauses.
- avoid_empty_else
# Avoid overloading operator == and hashCode on classes not marked `@immutable`.
# - avoid_equals_and_hash_code_on_mutable_classes
# Avoid escaping inner quotes by converting surrounding quotes.
# - avoid_escaping_inner_quotes
# Avoid field initializers in const classes.
# - avoid_field_initializers_in_const_classes
# Avoid `final` for parameter declarations.
# - avoid_final_parameters
# Avoid using `forEach` with a function literal.
- avoid_function_literals_in_foreach_calls
# Avoid using 'FutureOr<void>' as the type of a result.
# - avoid_futureor_void
# Don't implement classes that override `==`.
# - avoid_implementing_value_types
# Don't explicitly initialize variables to `null`.
- avoid_init_to_null
# Avoid JavaScript rounded ints.
# - avoid_js_rounded_ints
# Don't declare multiple variables on a single line.
# - avoid_multiple_declarations_per_line
# Don't check for `null` in custom `==` operators.
# - avoid_null_checks_in_equality_operators
# Avoid positional boolean parameters.
# - avoid_positional_boolean_parameters
# Avoid `print` calls in production code.
- avoid_print
# Avoid private typedef functions.
# - avoid_private_typedef_functions
# Avoid redundant argument values.
# - avoid_redundant_argument_values
# Avoid relative imports for files in `lib/`.
- avoid_relative_lib_imports
# Don't rename parameters of overridden methods.
- avoid_renaming_method_parameters
# Avoid return types on setters.
- avoid_return_types_on_setters
# Avoid returning `null` for `void`.
- avoid_returning_null_for_void
# Avoid returning this from methods just to enable a fluent interface.
# - avoid_returning_this
# Avoid setters without getters.
# - avoid_setters_without_getters
# Avoid shadowing type parameters.
- avoid_shadowing_type_parameters
# Avoid single cascade in expression statements.
- avoid_single_cascade_in_expression_statements
# Avoid slow asynchronous `dart:io` methods.
# - avoid_slow_async_io
# Avoid <Type>.toString() in production code since results may be minified.
# - avoid_type_to_string
# Avoid types as parameter names.
- avoid_types_as_parameter_names
# Avoid annotating types for function expression parameters.
# - avoid_types_on_closure_parameters
# Avoid unnecessary containers.
- avoid_unnecessary_containers
# Avoid defining unused parameters in constructors.
# - avoid_unused_constructor_parameters
# Avoid `async` functions that return `void`.
# - avoid_void_async
# Avoid using web-only libraries outside Flutter web plugin packages.
- avoid_web_libraries_in_flutter
# Await only futures.
- await_only_futures
# Name extensions using UpperCamelCase.
- camel_case_extensions
# Name types using UpperCamelCase.
- camel_case_types
# Cancel instances of `dart:async` `StreamSubscription`.
# - cancel_subscriptions
# Cascade consecutive method invocations on the same reference.
# - cascade_invocations
# Don't cast a nullable value to a non nullable type.
# - cast_nullable_to_non_nullable
# Close instances of `dart:core` `Sink`.
# - close_sinks
# Invocation of various collection methods with arguments of unrelated types.
- collection_methods_unrelated_type
# Sort combinator names alphabetically.
# - combinators_ordering
# Only reference in-scope identifiers in doc comments.
# - comment_references
# Missing conditional import.
# - conditional_uri_does_not_exist
# Prefer using lowerCamelCase for constant names.
- constant_identifier_names
# Avoid control flow in `finally` blocks.
- control_flow_in_finally
# DO use curly braces for all flow control structures.
- curly_braces_in_flow_control_structures
# Attach library doc comments to library directives.
- dangling_library_doc_comments
# Depend on referenced packages.
- depend_on_referenced_packages
# Missing deprecated annotation.
# - deprecated_consistency
# Avoid using deprecated elements from within the package in which they are declared.
# - deprecated_member_use_from_same_package
# DO reference all public properties in debug methods.
# - diagnostic_describe_all_properties
# Adhere to Effective Dart Guide directives sorting conventions.
# - directives_ordering
# Don't invoke asynchronous functions in non-`async` blocks.
# - discarded_futures
# Do not use environment declared variables.
# - do_not_use_environment
# Document ignore comments.
# - document_ignores
# Avoid empty catch blocks.
- empty_catches
# Use `;` instead of `{}` for empty constructor bodies.
- empty_constructor_bodies
# Avoid empty statements.
- empty_statements
# Put a single newline at end of file.
# - eol_at_end_of_file
# Define case clauses for all constants in enum-like classes.
- exhaustive_cases
# Name source files using `lowercase_with_underscores`.
- file_names
# Use Flutter TODO format: // TODO(username): message, https://URL-to-issue.
# - flutter_style_todos
# Always override `hashCode` if overriding `==`.
- hash_and_equals
# Don't import implementation files from another package.
- implementation_imports
# Explicitly tear-off `call` methods when using an object as a Function.
- implicit_call_tearoffs
# Don't implicitly reopen classes.
# - implicit_reopen
# Use case expressions that are valid in Dart 3.0.
# - invalid_case_patterns
# Avoid runtime type tests with JS interop types where the result may not be platform-consistent.
- invalid_runtime_check_with_js_interop_types
# Join return statement with assignment when possible.
# - join_return_with_assignment
# Start multiline strings with a newline.
# - leading_newlines_in_multiline_strings
# Attach library annotations to library directives.
- library_annotations
# Name libraries using `lowercase_with_underscores`.
# - library_names
# Use `lowercase_with_underscores` when specifying a library prefix.
- library_prefixes
# Avoid using private types in public APIs.
- library_private_types_in_public_api
# Avoid lines longer than 80 characters.
# - lines_longer_than_80_chars
# Boolean expression composed only with literals.
# - literal_only_boolean_expressions
# Use matching super parameter names.
# - matching_super_parameters
# A code block is missing a specified language.
# - missing_code_block_language_in_doc_comment
# Missing whitespace between adjacent strings.
# - missing_whitespace_between_adjacent_strings
# Don't use adjacent strings in list.
# - no_adjacent_strings_in_list
# No default cases.
# - no_default_cases
# Don't use more than one case with same value.
- no_duplicate_case_values
# Avoid leading underscores for library prefixes.
- no_leading_underscores_for_library_prefixes
# Avoid leading underscores for local identifiers.
- no_leading_underscores_for_local_identifiers
# Don't compare boolean expressions to boolean literals.
# - no_literal_bool_comparisons
# Don't put any logic in createState.
- no_logic_in_create_state
# Avoid calling `toString()` on `runtimeType`.
# - no_runtimeType_toString
# Don't assign a variable to itself.
# - no_self_assignments
# Don't use wildcard parameters or variables.
- no_wildcard_variable_uses
# Name non-constant identifiers using lowerCamelCase.
- non_constant_identifier_names
# Noop primitive operations.
# - noop_primitive_operations
# Don't use `null` check on a potentially nullable type parameter.
- null_check_on_nullable_type_parameter
# Do not pass `null` as an argument where a closure is expected.
- null_closures
# Omit type annotations for local variables.
# - omit_local_variable_types
# Omit obvious type annotations for local variables.
# - omit_obvious_local_variable_types
# Avoid defining a one-member abstract class when a simple function will do.
# - one_member_abstracts
# Only throw instances of classes extending either Exception or Error.
# - only_throw_errors
# Don't override fields.
- overridden_fields
# Provide doc comments for all public APIs.
# - package_api_docs
# Use `lowercase_with_underscores` for package names.
- package_names
# Prefix library names with the package name and a dot-separated path.
# - package_prefixed_library_names
# Don't reassign references to parameters of functions or methods.
# - parameter_assignments
# Use adjacent strings to concatenate string literals.
- prefer_adjacent_string_concatenation
# Prefer putting asserts in initializer lists.
# - prefer_asserts_in_initializer_lists
# Prefer asserts with message.
# - prefer_asserts_with_message
# Use collection literals when possible.
- prefer_collection_literals
# Prefer using `??=` over testing for `null`.
- prefer_conditional_assignment
# Prefer `const` with constant constructors.
# - prefer_const_constructors
# Prefer declaring `const` constructors on `@immutable` classes.
- prefer_const_constructors_in_immutables
# Prefer `const` over `final` for declarations.
# - prefer_const_declarations
# Prefer const literals as parameters of constructors on @immutable classes.
# - prefer_const_literals_to_create_immutables
# Prefer defining constructors instead of static methods to create instances.
# - prefer_constructors_over_static_methods
# Use contains for `List` and `String` instances.
- prefer_contains
# Prefer double quotes where they won't require escape sequences.
# - prefer_double_quotes
# Use => for short members whose body is a single return statement.
# - prefer_expression_function_bodies
# Private field could be `final`.
- prefer_final_fields
# Prefer final in for-each loop variable if reference is not reassigned.
# - prefer_final_in_for_each
# Prefer final for variable declarations if they are not reassigned.
# - prefer_final_locals
# Prefer final for parameter declarations if they are not reassigned.
# - prefer_final_parameters
# Prefer `for` elements when building maps from iterables.
- prefer_for_elements_to_map_fromIterable
# Use `forEach` to only apply a function to all the elements.
# - prefer_foreach
# Use a function declaration to bind a function to a name.
- prefer_function_declarations_over_variables
# Prefer generic function type aliases.
- prefer_generic_function_type_aliases
# Prefer if elements to conditional expressions where possible.
# - prefer_if_elements_to_conditional_expressions
# Prefer using `??` operators.
- prefer_if_null_operators
# Use initializing formals when possible.
- prefer_initializing_formals
# Inline list item declarations where possible.
- prefer_inlined_adds
# Prefer int literals over double literals.
# - prefer_int_literals
# Use interpolation to compose strings and values.
- prefer_interpolation_to_compose_strings
# Use `isEmpty` for `Iterable`s and `Map`s.
- prefer_is_empty
# Use `isNotEmpty` for `Iterable`s and `Map`s.
- prefer_is_not_empty
# Prefer is! operator.
- prefer_is_not_operator
# Prefer to use `whereType` on iterable.
- prefer_iterable_whereType
# Prefer using mixins.
# - prefer_mixin
# Prefer `null`-aware method calls.
# - prefer_null_aware_method_calls
# Prefer using `null`-aware operators.
- prefer_null_aware_operators
# Prefer relative imports for files in `lib/`.
# - prefer_relative_imports
# Only use double quotes for strings containing single quotes.
# - prefer_single_quotes
# Use spread collections when possible.
- prefer_spread_collections
# Prefer typing uninitialized variables and fields.
- prefer_typing_uninitialized_variables
# Don't use the Null type, unless you are positive that you don't want void.
# - prefer_void_to_null
# Provide a deprecation message, via `@Deprecated("message")`.
- provide_deprecation_message
# Document all public members.
# - public_member_api_docs
# Property getter recursively returns itself.
- recursive_getters
# Use trailing commas for all parameter lists and argument lists.
# - require_trailing_commas
# Use secure urls in `pubspec.yaml`.
- secure_pubspec_urls
# `SizedBox` for whitespace.
- sized_box_for_whitespace
# Use SizedBox shrink and expand named constructors.
# - sized_box_shrink_expand
# Prefer using `///` for doc comments.
- slash_for_doc_comments
# Sort child properties last in widget instance creations.
- sort_child_properties_last
# Sort constructor declarations before other members.
# - sort_constructors_first
# Sort pub dependencies alphabetically.
# - sort_pub_dependencies
# Sort unnamed constructor declarations first.
# - sort_unnamed_constructors_first
# Specify non-obvious type annotations for local variables.
# - specify_nonobvious_local_variable_types
# Test type of argument in `operator ==(Object other)`.
# - test_types_in_equals
# Avoid `throw` in `finally` block.
# - throw_in_finally
# Tighten type of initializing formal.
# - tighten_type_of_initializing_formals
# Type annotate public APIs.
# - type_annotate_public_apis
# Don't type annotate initializing formals.
- type_init_formals
# Don't use constant patterns with type literals.
- type_literal_in_constant_pattern
# `Future` results in `async` function bodies must be `await`ed or marked `unawaited` using `dart:async`.
# - unawaited_futures
# Use of angle brackets in a doc comment is treated as HTML by Markdown.
- unintended_html_in_doc_comment
# Unnecessary `await` keyword in return.
# - unnecessary_await_in_return
# Avoid using braces in interpolation when not needed.
- unnecessary_brace_in_string_interps
# Don't use explicit `break`s when a break is implied.
# - unnecessary_breaks
# Avoid `const` keyword.
- unnecessary_const
# Unnecessary `.new` constructor name.
- unnecessary_constructor_name
# Don't use `final` for local variables.
# - unnecessary_final
# Avoid wrapping fields in getters and setters just to be "safe".
- unnecessary_getters_setters
# Don't create a lambda when a tear-off will do.
# - unnecessary_lambdas
# Don't specify the `late` modifier when it is not needed.
- unnecessary_late
# Avoid library directives unless they have documentation comments or annotations.
# - unnecessary_library_directive
# Don't have a library name in a `library` declaration.
- unnecessary_library_name
# Unnecessary new keyword.
- unnecessary_new
# Avoid `null` in `null`-aware assignment.
- unnecessary_null_aware_assignments
# Unnecessary null aware operator on extension on a nullable type.
# - unnecessary_null_aware_operator_on_extension_on_nullable
# Unnecessary `null` checks.
# - unnecessary_null_checks
# Avoid using `null` in `??` operators.
- unnecessary_null_in_if_null_operators
# Use a non-nullable type for a final variable initialized with a non-nullable value.
- unnecessary_nullable_for_final_variable_declarations
# Don't override a method to do a super method invocation with the same parameters.
- unnecessary_overrides
# Unnecessary parentheses can be removed.
# - unnecessary_parenthesis
# Unnecessary raw string.
# - unnecessary_raw_strings
# Avoid using unnecessary statements.
# - unnecessary_statements
# Remove unnecessary backslashes in strings.
- unnecessary_string_escapes
# Unnecessary string interpolation.
- unnecessary_string_interpolations
# Don't access members with `this` unless avoiding shadowing.
- unnecessary_this
# Unnecessary `toList()` in spreads.
- unnecessary_to_list_in_spreads
# Unreachable top-level members in executable libraries.
# - unreachable_from_main
# Equality operator `==` invocation with references of unrelated types.
- unrelated_type_equality_checks
# Do not use `BuildContext` across asynchronous gaps.
- use_build_context_synchronously
# Use `ColoredBox`.
# - use_colored_box
# Use `DecoratedBox`.
# - use_decorated_box
# Use enums rather than classes that behave like enums.
# - use_enums
# Prefer an 8-digit hexadecimal integer (for example, 0xFFFFFFFF) to instantiate a Color.
- use_full_hex_values_for_flutter_colors
# Use generic function type syntax for parameters.
- use_function_type_syntax_for_parameters
# Use `??` operators to convert `null`s to `bool`s.
# - use_if_null_to_convert_nulls_to_bools
# Prefer intValue.isOdd/isEven instead of checking the result of % 2.
# - use_is_even_rather_than_modulo
# Use key in widget constructors.
- use_key_in_widget_constructors
# Use late for private members with a non-nullable type.
# - use_late_for_private_fields_and_variables
# Use predefined named constants.
# - use_named_constants
# Use raw string to avoid escapes.
# - use_raw_strings
# Use rethrow to rethrow a caught exception.
- use_rethrow_when_possible
# Use a setter for operations that conceptually change a property.
# - use_setters_to_change_properties
# Use string buffers to compose strings.
# - use_string_buffers
# Use string in part of directives.
- use_string_in_part_of_directives
# Use super-initializer parameters where possible.
- use_super_parameters
# Use throwsA matcher instead of fail().
# - use_test_throws_matchers
# Start the name of the method with to/_to or as/_as if applicable.
# - use_to_and_as_if_applicable
# Use truncating division.
# - use_truncating_division
# Use valid regular expression syntax.
- valid_regexps
# Don't assign to `void`.
- void_checks