-
Notifications
You must be signed in to change notification settings - Fork 67
/
analysis_options.yaml
75 lines (71 loc) · 2.17 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
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:very_good_analysis/analysis_options.yaml
# Disables warnings that happen in .freezed.dart
analyzer:
plugins:
- dart_code_metrics
exclude:
- "**/*.g.dart"
- "**/*.gr.dart"
- "**/*.freezed.dart"
- "**/*.config.dart"
- "**/*.graphql.dart"
- "**/graphql_api.dart"
errors:
invalid_annotation_target: ignore
linter:
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
public_member_api_docs: false
sort_pub_dependencies: false
lines_longer_than_80_chars: false
flutter_style_todos: false
dart_code_metrics:
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 50
metrics-exclude:
- test/**
- "**/*.g.dart"
- "**/*.gr.dart"
- "**/*.freezed.dart"
- "**/*.config.dart"
- "**/*.graphql.dart"
- "**/graphql_api.dart"
rules:
- avoid-collection-methods-with-unrelated-types
- avoid-global-state
- avoid-missing-enum-constant-in-map
- avoid-non-ascii-symbols
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- avoid-unused-parameters
- binary-expression-operand-order
- double-literal-format
- format-comment
- newline-before-return
- no-boolean-literal-compare
- no-equal-then-else
- no-object-declaration
- prefer-async-await
- prefer-commenting-analyzer-ignores
- prefer-conditional-expressions
- prefer-first
- prefer-immediate-return
- prefer-last
- prefer-trailing-comma
- tag-name
- always-remove-listener
- avoid-border-all
- avoid-unnecessary-setstate
- prefer-const-border-radius