-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
66 lines (60 loc) · 1.94 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
# 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:flutter_lints/flutter.yaml
linter:
rules:
avoid_annotating_with_dynamic: false
avoid_positional_boolean_parameters: false
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
errors:
body_might_complete_normally_nullable: "ignore"
strict_raw_type: "ignore"
no_runtimetype_tostring: "ignore"
multiple_plugins: "ignore"
exclude:
- "**.gr.dart"
- "**.freezed.dart"
- "**.cached.dart"
- "**.g.dart"
- "**.mocks.dart"
- "**.config.dart"
- "lib/generated_plugin_registrant.dart"
- "build/**"
- "assets/**"
- "ios/**"
- "android/**"
- "lib/presentation/gen/**"
- "distribution/**"
- "integration_test/e2e/features/**/*.dart"
- "integration_test/e2e/e2e_tests.dart"
dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-parameters: 4
maximum-nesting-level: 5
rules:
- avoid-global-state
- avoid-nested-conditional-expressions
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- binary-expression-operand-order
- double-literal-format
- newline-before-return
- no-equal-then-else
- no-object-declaration
- avoid-shrink-wrap-in-lists
- always-remove-listener
- avoid-returning-widgets:
ignored-annotations:
- usedInListView
- conditionalWidget
- avoid-unnecessary-setstate