-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
78 lines (74 loc) · 2.15 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
include: package:flutter_lints/flutter.yaml
linter:
rules:
- always_put_control_body_on_new_line
- prefer_single_quotes
- use_enums
- use_is_even_rather_than_modulo
- require_trailing_commas
- sort_constructors_first
- sort_child_properties_last
- use_setters_to_change_properties
analyzer:
plugins:
- custom_lint
exclude:
- "**.freezed.dart"
- "**.g.dart"
- "**.tailor.dart"
- "**.velvet.dart"
custom_lint:
rules:
# Pyramid Lint - https://docs.page/charlescyt/pyramid_lint
# Commented rules are intentionally disabled but they will be kept here for future reference
- always_put_doc_comments_before_annotations
- always_specify_parameter_names
- avoid_abbreviations_in_doc_comments
- avoid_dynamic
- avoid_empty_blocks
# - avoid_inverted_boolean_expressions
# - avoid_mutable_global_variables
- avoid_nested_if
# - avoid_positional_fields_in_records
# - avoid_redudant_pattern_field_names
# - avoid_unused_parameters
- boolean_prefixes
# - class_members_ordering
- max_lines_for_file:
max_lines: 500
- max_lines_for_function:
max_lines: 200
# - max_switch_cases:
# max_cases: 5
- no_duplicate_imports
- no_self_comparisons
- prefer_async_await
# - prefer_const_constructor_declarations
- prefer_immediate_return
- prefer_iterable_any
- prefer_iterable_every
- prefer_iterable_first
- prefer_iterable_last
# - prefer_library_prefixes
- prefer_new_line_before_return
# - prefer_underscore_for_unused_callback_parameters
- unnecessary_nullable_return_type
- avoid_public_member_in_states
- avoid_returning_widgets
- avoid_single_child_flex
# - dispose_controllers
- prefer_async_callback
- prefer_border_from_border_side
- prefer_border_radius_all
- prefer_dedicated_media_query_functions
- prefer_text_rich
- prefer_void_callback
- proper_edge_insets_constructors
- proper_expanded_and_flexible
# - proper_from_environment
# - proper_super_dispose
# - proper_super_init_state
- use_spacer
dart_code_metrics:
extends:
- recommended