-
Notifications
You must be signed in to change notification settings - Fork 4
/
analysis_options.yaml
73 lines (61 loc) · 1.96 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
include: package:very_good_analysis/analysis_options.yaml
analyzer:
plugins:
- dart_code_metrics
linter:
rules:
library_private_types_in_public_api: false
public_member_api_docs: false
lines_longer_than_80_chars: false
# ------ Disable individual rules ----- #
# --- #
# Turn off what you don't like. #
# ------------------------------------- #
# Use parameter order as in json response
always_put_required_named_parameters_first: true
# Util classes are awesome!
avoid_classes_with_only_static_members: false
directives_ordering: false
# ------ Enable individual rules ------ #
# --- #
# These rules here are good but too #
# opinionated to enable them by default #
# ------------------------------------- #
# Make constructors the first thing in every class
sort_constructors_first: true
# The new tabs vs. spaces. Choose wisely
prefer_single_quotes: true
# Blindly follow the Flutter code style, which prefers types everywhere
# always_specify_types: true
dart_code_metrics:
anti-patterns:
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 50
metrics-exclude:
- test/**
rules:
- avoid-global-state
- avoid-border-all
- avoid-shrink-wrap-in-lists
- avoid-unnecessary-setstate
- avoid-use-expanded-as-spacer
- avoid-wrapping-in-padding
- prefer-correct-edge-insets-constructor
- prefer-extracting-callbacks:
allowed-line-count: 5
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
- binary-expression-operand-order
- double-literal-format
- no-boolean-literal-compare
- prefer-match-file-name:
exclude:
- test/**