forked from bytedance/flutter_ume
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis_options.yaml
More file actions
76 lines (71 loc) · 2.02 KB
/
analysis_options.yaml
File metadata and controls
76 lines (71 loc) · 2.02 KB
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
include: package:flutter_lints/flutter.yaml
analyzer:
errors:
todo: ignore
invalid_annotation_target: ignore
exclude:
- lib/generated
- lib/l10n
- lib/generated_plugin_registrant.dart
- "**/*.g.dart"
- "**/*.freezed.dart"
plugins:
- custom_lint
linter:
rules:
library_private_types_in_public_api: false
camel_case_types: true
camel_case_extensions: true
library_names: true
file_names: true
library_prefixes: true
curly_braces_in_flow_control_structures: true
non_constant_identifier_names: true
constant_identifier_names: true
directives_ordering: true
slash_for_doc_comments: true
implementation_imports: true
avoid_relative_lib_imports: true
prefer_relative_imports: true
prefer_adjacent_string_concatenation: true
unnecessary_brace_in_string_interps: true
prefer_iterable_whereType: true
unnecessary_lambdas: true
avoid_init_to_null: true
unnecessary_this: true
prefer_initializing_formals: true
type_init_formals: true
empty_constructor_bodies: true
unnecessary_new: true
unnecessary_const: true
avoid_catching_errors: true
use_rethrow_when_possible: true
prefer_interpolation_to_compose_strings: true
prefer_collection_literals: true
prefer_function_declarations_over_variables: true
use_to_and_as_if_applicable: true
prefer_final_fields: true
avoid_private_typedef_functions: true
hash_and_equals: true
avoid_null_checks_in_equality_operators: true
prefer_mixin: true
type_annotate_public_apis: true
prefer_generic_function_type_aliases: true
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 50
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else