-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
91 lines (87 loc) · 3.23 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
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
analyzer:
plugins:
- custom_lint
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
errors:
invalid_annotation_target: ignore
linter:
rules:
always_declare_return_types: true
always_put_required_named_parameters_first: true
avoid_bool_literals_in_conditional_expressions: true
avoid_catching_errors: true
avoid_double_and_int_checks: true
avoid_equals_and_hash_code_on_mutable_classes: true
avoid_final_parameters: true # Because we use parameter_assignments rule
avoid_multiple_declarations_per_line: true
avoid_positional_boolean_parameters: true
avoid_private_typedef_functions: true
avoid_redundant_argument_values: true
avoid_returning_this: true
avoid_slow_async_io: true
avoid_types_on_closure_parameters: true
avoid_unused_constructor_parameters: true
avoid_void_async: true
cancel_subscriptions: true
cascade_invocations: true
cast_nullable_to_non_nullable: true
combinators_ordering: true
conditional_uri_does_not_exist: true
deprecated_consistency: true
directives_ordering: true
eol_at_end_of_file: true
join_return_with_assignment: true
leading_newlines_in_multiline_strings: true
literal_only_boolean_expressions: true
missing_whitespace_between_adjacent_strings: true
no_adjacent_strings_in_list: true
noop_primitive_operations: true
only_throw_errors: true
parameter_assignments: true
prefer_asserts_in_initializer_lists: true
prefer_const_constructors: true
prefer_const_declarations: true
prefer_const_literals_to_create_immutables: true
prefer_constructors_over_static_methods: true
prefer_final_in_for_each: true
prefer_final_locals: true
prefer_if_elements_to_conditional_expressions: true
prefer_null_aware_method_calls: true
prefer_relative_imports: true
prefer_single_quotes: true
require_trailing_commas: true
sized_box_shrink_expand: true
sort_constructors_first: true
sort_pub_dependencies: true
sort_unnamed_constructors_first: true
test_types_in_equals: true
throw_in_finally: true
tighten_type_of_initializing_formals: true
type_annotate_public_apis: true
unnecessary_await_in_return: true
unnecessary_breaks: true
unnecessary_lambdas: true
unnecessary_library_directive: true
unnecessary_null_aware_operator_on_extension_on_nullable: true
unnecessary_parenthesis: true
unnecessary_statements: true
use_colored_box: true
use_decorated_box: true
use_enums: true
use_if_null_to_convert_nulls_to_bools: true
use_is_even_rather_than_modulo: true
use_named_constants: true
use_raw_strings: true
use_test_throws_matchers: true
use_to_and_as_if_applicable: true