This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
analysis_options.yaml
81 lines (72 loc) · 2.16 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
include: all_lint_rules.yaml
analyzer:
plugins:
- dart_code_metrics
errors:
missing_required_param: error
omit_local_variable_types: error
include_file_not_found: error
unused_element: error
unused_field: error
unused_local_variable: error
strong-mode:
implicit-casts: false
implicit-dynamic: false
exclude:
- '**/*.g.dart'
- '**/*.gr.dart'
- '**/*.freezed.dart'
- '**/*.config.dart'
linter:
rules:
# too verbose
prefer_final_parameters: false
# Too verbose with little value, and this is taken care of by the Flutter devtool anyway.
diagnostic_describe_all_properties: false
# Conflicts with `prefer_single_quotes`
# Single quotes are easier to type and don't compromise on readability.
prefer_double_quotes: false
# This project doesn't use Flutter-style todos
flutter_style_todos: false
# Boring as it sometimes force a line of 81 characters to be split in two.
# As long as we try to respect that 80 characters limit, going slightly
# above is fine.
lines_longer_than_80_chars: false
# Conflicts with disabling `implicit-dynamic`
avoid_annotating_with_dynamic: false
# conflicts with `prefer_relative_imports`
always_use_package_imports: false
public_member_api_docs: false
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 80
metrics-exclude:
- test/**
rules:
# - avoid-ignoring-return-values
# - avoid-late-keyword
# - avoid-nested-conditional-expressions
- avoid-unused-parameters
- binary-expression-operand-order
- double-literal-format
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
# - no-equal-arguments
- no-equal-then-else
- no-object-declaration
- prefer-conditional-expressions
- prefer-correct-identifier-length
- prefer-correct-type-name
# - prefer-first
- prefer-last
- prefer-match-file-name
- prefer-trailing-comma
- prefer-correct-identifier-length:
min-identifier-length: 1