-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathanalysis_options.yaml
97 lines (94 loc) · 2.83 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
include: package:all_lint_rules_community/all.yaml
analyzer:
exclude:
- "example/"
errors:
# Without ignore here, we cause import of all_lint_rules to warn, because some rules conflict.
# We explicitly enabled even conflicting rules and are fixing the conflicts in this file.
included_file_warning: ignore
# Treat missing required parameters as an error.
missing_required_param: error
# Treat missing returns as an error, not as a hint or a warning.
missing_return: error
# Allow having TODOs in the code.
todo: ignore
linter:
rules:
# Custom enabled rules
avoid_types_on_closure_parameters: true
omit_local_variable_types: true
always_declare_return_types: true
# Custom disabled rules
avoid_redundant_argument_values: false
prefer_asserts_with_message: false
unnecessary_lambdas: false
discarded_futures: false
unnecessary_late: false
cast_nullable_to_non_nullable: false
avoid_implementing_value_types: false
always_put_required_named_parameters_first: false
prefer_double_quotes: false
unnecessary_final: false
public_member_api_docs: false
avoid_catches_without_on_clauses: false
always_specify_types: false
prefer_final_parameters: false
sort_pub_dependencies: false
library_private_types_in_public_api: false
diagnostic_describe_all_properties: false
hash_and_equals: false
cascade_invocations: false
lines_longer_than_80_chars: false
prefer_relative_imports: false
prefer_mixin: false
unnecessary_raw_strings: false
prefer_expression_function_bodies: false
no_default_cases: false
prefer_single_quotes: false
only_throw_errors: false
always_use_package_imports: false
avoid_dynamic_calls: false
type_annotate_public_apis: false
use_if_null_to_convert_nulls_to_bools: false
use_setters_to_change_properties: false
avoid_catching_errors: false
comment_references: false
one_member_abstracts: false
avoid_private_typedef_functions: false
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
metrics-exclude:
- test/**
- test_driver/**
- integration_test/**
rules:
- avoid-unused-parameters
- member-ordering:
order:
- constructors
- public-fields
- private-fields
- public-getters
- public-setters
- private-getters
- private-setters
- public-methods
- private-methods
- newline-before-return
- no-equal-arguments
- no-empty-block:
exclude:
- test/**
- no-equal-then-else
- no-magic-number:
exclude:
- test/**
- prefer-match-file-name:
exclude:
- test/**