-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetrics.yaml
82 lines (79 loc) · 2.52 KB
/
metrics.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
dart_code_linter:
metrics:
cyclomatic-complexity: 30
maximum-nesting-level: 7
anti-patterns:
- long-method
rules:
# Dart
- avoid-banned-imports:
entries:
- paths: [ 'lib\/domain(\/\w+)+\.dart' ]
deny: [ '^package:\w*\/ui(\/\w+)+\.dart$' ]
message: 'Do not import UI classes within domain layer'
- paths: [ 'lib\/infrastructure(\/\w+)+\.dart' ]
deny: [ '^package:\w*\/ui(\/\w+)+\.dart$' ]
message: 'Do not import UI classes within infrastructure layer'
- paths: [ 'lib\/domain(\/\w+)+\.dart' ]
deny: [ '^package:\w*\/infrastructure(\/\w+)+\.dart$' ]
message: 'Do not import infrastructure layer classes within domain layer'
- avoid-cascade-after-if-null
- avoid-collection-methods-with-unrelated-types
- avoid-double-slash-imports
- avoid-duplicate-exports
- avoid-dynamic
- avoid-global-state
- avoid-missing-enum-constant-in-map
- avoid-nested-conditional-expressions:
acceptable-level: 2
- avoid-non-ascii-symbols
- avoid-redundant-async
- avoid-substring
- avoid-unnecessary-conditionals
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- avoid-unused-parameters
- binary-expression-operand-order
- double-literal-format
- list-all-equatable-fields
- missing-test-assertion
- no-boolean-literal-compare
- no-empty-block
- no-equal-then-else
- no-object-declaration
- prefer-async-await
- prefer-correct-test-file-name
- prefer-correct-type-name
- prefer-enums-by-name
- prefer-first
- prefer-immediate-return
- prefer-iterable-of
- prefer-last
- prefer-moving-to-variable:
allowed-duplicated-chains: 3
exclude:
- test/**
- integration_test/**
- prefer-static-class:
exclude:
- test/**
- integration_test/**
- prefer-trailing-comma
# Flutter
- always-remove-listener
- avoid-border-all
- avoid-returning-widgets
- avoid-shrink-wrap-in-lists
- avoid-unnecessary-setstate
- avoid-expanded-as-spacer
- consistent-update-render-object
- prefer-const-border-radius
- prefer-correct-edge-insets-constructor
- prefer-define-hero-tag
- prefer-extracting-callbacks:
allowed-line-count: 5
- prefer-single-widget-per-file:
ignore-private-widgets: true
- prefer-using-list-view
- use-setstate-synchronously