-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
88 lines (69 loc) · 2.55 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
include: package:flutter_lints/flutter.yaml
analyzer:
strong-mode:
implicit-casts: true
implicit-dynamic: true
exclude:
- "lib/generated_plugin_registrant.dart"
- "**/*.g.dart"
- "**/*.freezed.dart"
errors:
# treat missing required parameters as a error (not a hint)
missing_required_param: error
# treat missing returns as a warning (not a hint)
missing_return: warning
unused_import: error
# Avoid unnecessary containers.
avoid_unnecessary_containers: warning
#Avoid calling toString() on runtimeType.
no_runtimeType_toString: warning
#Don't use null check on a potentially nullable type parameter.
null_check_on_nullable_type_parameter: warning
# Don't explicitly initialize variables to null.
avoid_init_to_null: warning
#Avoid async functions that return void.
avoid_void_async: warning
#Cancel instances of dart.async.StreamSubscription.
cancel_subscriptions: warning
#Close instances of dart.core.Sink.
close_sinks: warning
deprecated_member_use: warning
linter:
rules:
#Prefer const with constant constructors.
prefer_const_constructors: true
#Avoid setters without getters.
avoid_setters_without_getters: true
#Declare method return types.
always_declare_return_types: true
#Don't import implementation files from another package.
implementation_imports: true
#Don't specify the late modifier when it is not needed.
unnecessary_late: true
#Avoid .toString() in production code since results may be minified.
avoid_type_to_string: true
avoid_classes_with_only_static_members: true
avoid_field_initializers_in_const_classes: true
avoid_function_literals_in_foreach_calls: true
avoid_positional_boolean_parameters: true
avoid_print: true
avoid_types_on_closure_parameters: true
camel_case_extensions: true
camel_case_types: true
comment_references: true
constant_identifier_names: true
flutter_style_todos: true
literal_only_boolean_expressions: false
non_constant_identifier_names: true
one_member_abstracts: true
overridden_fields: true
prefer_constructors_over_static_methods: true
prefer_function_declarations_over_variables: true
prefer_interpolation_to_compose_strings: true
sort_constructors_first: true
type_annotate_public_apis: false
unnecessary_brace_in_string_interps: true
unnecessary_statements: true
unnecessary_this: true
use_setters_to_change_properties: true
no_leading_underscores_for_local_identifiers: false