-
Notifications
You must be signed in to change notification settings - Fork 1
/
analysis_options.yaml
82 lines (80 loc) · 2.04 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
include: lints.yaml
analyzer:
plugins:
- dart_code_metrics
exclude:
- lib/**/**.config.dart
- lib/**/**.g.dart
- lib/**/**.freezed.dart
- test/**
- lib/presentation/themes/**
- lib/data/datasources/local/database/app_database.dart
- lib/firebase_options.dart
errors:
invalid_annotation_target: ignore
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
# Function
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 40
# Class
weight-of-class: 0.33
# Tech debt
technical-debt:
threshold: 1
todo-cost: 24
ignore-cost: 8
ignore-for-file-cost: 24
as-dynamic-cost: 16
deprecated-annotations-cost: 24
file-nullsafety-migration-cost: 16
unit-type: "hours"
rules:
# Dart
- avoid-nested-conditional-expressions:
severity: warning
acceptable-level: 2
- avoid-missing-enum-constant-in-map:
severity: warning
- avoid-unnecessary-type-assertions:
severity: warning
- avoid-unnecessary-type-assertions:
severity: warning
- avoid-unnecessary-type-casts:
severity: warning
- avoid-unrelated-type-assertions:
severity: warning
- avoid-unused-parameters:
severity: warning
- binary-expression-operand-order:
severity: warning
- no-boolean-literal-compare:
severity: warning
- no-equal-arguments:
severity: warning
- no-equal-then-else:
severity: warning
- no-object-declaration:
severity: warning
- prefer-first:
severity: warning
- prefer-async-await:
severity: warning
- prefer-last:
severity: warning
- prefer-trailing-comma:
severity: warning
- prefer-match-file-name:
severity: warning
exclude:
- lib/presentation/themes/**
# Flutter
- always-remove-listener:
severity: warning
- avoid-unnecessary-setstate:
severity: warning