-
Notifications
You must be signed in to change notification settings - Fork 152
/
analysis_options.yaml
57 lines (50 loc) · 1.3 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
include: package:flutter_lints/flutter.yaml
analyzer:
exclude: [ ios/**, android/**, test/** ]
plugins:
- dart_code_metrics
errors:
empty_constructor_bodies: error
missing_required_param: error
always_use_package_imports: error
avoid_types_as_parameter_names: error
close_sinks: error
unnecessary_statements: warning
non_constant_identifier_names: warning
linter:
rules:
camel_case_types: true
# prefer_double_quotes: true
avoid_empty_else: true
constant_identifier_names: false
use_key_in_widget_constructors: false
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 8
source-lines-of-code: 50
metrics-exclude:
- test/**
- ios/**
- android/**
rules:
newline-before-return:
severity: error
no-boolean-literal-compare:
severity: warning
no-empty-block:
severity: error
# avoid-returning-widgets:
# severity: none
prefer-conditional-expressions:
severity: warning
no-magic-number:
severity: error
allowed: [ 0,1,2,3,4,5,6,7,8,9 ]
# avoid-unused-parameters:
# severity: warning
# severity -> none, style, performance, warning, error.