-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
101 lines (96 loc) · 2.93 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
include: package:very_good_analysis/analysis_options.yaml
linter:
rules:
- camel_case_types
- file_names
- exhaustive_cases
- sort_constructors_first
- sort_unnamed_constructors_first
analyzer:
exclude:
- lib/**.g.dart
- lib/**.chopper.dart
errors:
always_use_package_imports: false
avoid_function_literals_in_foreach_calls: false
avoid_positional_boolean_parameters: false
avoid_redundant_argument_values: false
avoid_returning_null_for_void: warning
avoid_returning_this: false
camel_case_types: warning
cascade_invocations: false
dead_null_aware_expression: warning
exhaustive_cases: warning
file_names: warning
invalid_use_of_visible_for_testing_member: warning
missing_required_param: warning
missing_return: warning
prefer_final_locals: warning
prefer_function_declarations_over_variables: false
prefer_typing_uninitialized_variables: warning
public_member_api_docs: false
require_trailing_commas: false
sdk_version_since: warning # Analyzer gives incorrect "Since" warnings on 3.0.*, this rule avoids that problem
sort_child_properties_last: warning
todo: warning
unawaited_futures: false # Avoid awaiting router push and replace results always
unnecessary_getters_setters: warning
unnecessary_import: warning
unnecessary_non_null_assertion: warning
unnecessary_null_comparison: warning
unrelated_type_equality_checks: warning
unused_field: warning
unused_import: warning
unused_local_variable: warning
plugins:
- dart_code_linter
dart_code_linter:
anti-patterns:
- long-method
rules-exclude:
- '**.g.dart'
- '**state.dart'
metrics-exclude:
- '**.g.dart'
- '**state.dart'
rules:
- always-remove-listener
- avoid-cascade-after-if-null
- avoid-redundant-async
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- avoid-unused-parameters
- avoid-nested-conditional-expressions
- avoid-double-slash-imports
- avoid-duplicate-exports
- avoid-global-state
- avoid-unnecessary-conditionals
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- member-ordering:
order:
- constructors
- dispose-method
- close-method
widgets-order:
- constructor
- init-state-method
- did-change-dependencies-method
- did-update-widget-method
- dispose-method
- build-method
- no-boolean-literal-compare
- no-empty-block
- no-equal-then-else
- no-empty-block
- no-equal-then-else
- prefer-commenting-analyzer-ignores
- prefer-correct-test-file-name
- prefer-match-file-name:
exclude:
- lib/common/extension/*
- lib/common/route/routes.dart
- lib/common/log.dart
- lib/main.dart
- test/**/stubs.dart