forked from 3Dpass/threedpass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
54 lines (50 loc) · 1.25 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
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
include: package:flutter_lints/flutter.yaml
linter:
rules:
avoid_print: false
prefer_single_quotes: true #
always_use_package_imports: true
avoid_dynamic_calls: true
avoid_empty_else: true
avoid_relative_lib_imports: true
analyzer:
plugins:
- dart_code_metrics
exclude:
- '**/*.g.dart'
- '**/*.freezed.dart'
- '**/*.gr.dart'
- packages/calc/**
dart_code_metrics:
metrics:
cyclomatic-complexity: 10
halstead-volume: 400
lines-of-code: 80
maintainability-index: 40
maximum-nesting-level: 5
number-of-methods: 10
number-of-parameters: 8
metrics-exclude:
- test/**
rules:
# Common rules
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-first
- prefer-last
- no-equal-then-else
# Flutter specific
- avoid-border-all
- 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