-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
91 lines (83 loc) · 2.47 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
include: package:flutter_lints/flutter.yaml
analyzer:
plugins:
- dart_code_metrics
exclude: [lib/generated/**,lib/generated_plugin_registrant.dart,lib/app/modules/**/*.g.dart,"**/*.config.dart"]
errors:
prefer_relative_imports: warning
constant_identifier_names: warning
non_constant_identifier_names: warning
unused_import: warning
avoid_redundant_argument_values: warning
require_trailing_commas: warning
always_put_required_named_parameters_first: warning
prefer_single_quotes: warning
linter:
rules:
avoid_print: true
always_declare_return_types: true
always_put_control_body_on_new_line: true
cascade_invocations: true
prefer_const_constructors: true
prefer_relative_imports: true
prefer_single_quotes: true
prefer_conditional_assignment: true
prefer_const_declarations: true
avoid_redundant_argument_values: true
avoid_types_on_closure_parameters: true
require_trailing_commas: true
always_put_required_named_parameters_first: true
overridden_fields: false
unawaited_futures: false
eol_at_end_of_file: true
join_return_with_assignment: true
prefer_final_in_for_each: true
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 6
source-lines-of-code: 50
halstead-volume: 150
lines-of-code: 50
number-of-methods: 5
weight-of-class: 0.33
technical-debt:
threshold: 1
todo-cost: 161
ignore-cost: 320
ignore-for-file-cost: 396
as-dynamic-cost: 322
deprecated-annotations-cost: 37
file-nullsafety-migration-cost: 41
unit-type: "BRL"
metrics-exclude:
- test/**
rules:
- avoid-collection-methods-with-unrelated-types
- avoid-global-state
- avoid-nested-conditional-expressions
- avoid-throw-in-catch-block
- avoid-unnecessary-type-casts
- avoid-unused-parameters
- avoid-border-all
- avoid-returning-widgets
- no-boolean-literal-compare
- no-empty-block
- no-equal-then-else
- prefer-conditional-expressions
- prefer-trailing-comma
- prefer-first
- prefer-conditional-expressions
- prefer-const-border-radius
- prefer-immediate-return
- prefer-async-await
- prefer-extracting-callbacks
- prefer-async-await
- always-remove-listener
- binary-expression-operand-order
- newline-before-return
- double-literal-format