-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathanalysis_options.yaml
46 lines (42 loc) · 1.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
# 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:
prefer_single_quotes: true
sort_pub_dependencies: true
prefer_expression_function_bodies: true
prefer_final_in_for_each: true
prefer_if_elements_to_conditional_expressions: true
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.gr.dart"
- "**/*.freezed.dart"
- "packages/openapi/**"
plugins:
- dart_code_metrics
dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-parameters: 4
maximum-nesting-level: 5
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
- avoid-returning-widgets
- avoid-unnecessary-setstate
- avoid-wrapping-in-padding
- prefer-const-border-radius
- prefer-extracting-callbacks
- prefer-single-widget-per-file:
ignore-private-widgets: true
anti-patterns:
- long-method
- long-parameter-list