-
Notifications
You must be signed in to change notification settings - Fork 3
/
analysis_options.yaml
119 lines (115 loc) · 3.33 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Defines a default set of lint rules enforced for
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.
include: package:pedantic/analysis_options.yaml
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
# Uncomment to specify additional rules.
linter:
rules:
# pedantic
- avoid_empty_else
- avoid_init_to_null
- avoid_relative_lib_imports
- avoid_return_types_on_setters
- avoid_shadowing_type_parameters
- avoid_types_as_parameter_names
- empty_constructor_bodies
- no_duplicate_case_values
- null_closures
- prefer_contains
- prefer_equal_for_default_values
- prefer_is_empty
- prefer_is_not_empty
- recursive_getters
- slash_for_doc_comments
- unawaited_futures
- unrelated_type_equality_checks
- use_rethrow_when_possible
- valid_regexps
# Effective dart
# --- STYLE
# identifiers
- camel_case_types
- library_names
- file_names
- library_prefixes
- non_constant_identifier_names
- constant_identifier_names # prefer
# ordering
- directives_ordering
# formatting
- lines_longer_than_80_chars # avoid
- curly_braces_in_flow_control_structures
# --- DOCUMENTATION
# comments
# doc comments
#- slash_for_doc_comments
- package_api_docs # prefer
- comment_references
# markdown
# writing
# --- USAGE
# libraries
- implementation_imports
#- avoid_relative_lib_imports
# strings
- prefer_adjacent_string_concatenation
- prefer_interpolation_to_compose_strings # prefer
- unnecessary_brace_in_string_interps # avoid
# collections
- prefer_collection_literals
- avoid_function_literals_in_foreach_calls # avoid
- prefer_iterable_whereType
# functions
- prefer_function_declarations_over_variables
- unnecessary_lambdas
# parameters
#- prefer_equal_for_default_values
# variables
#- avoid_init_to_null
# members
- unnecessary_getters_setters
- prefer_final_fields
#- prefer_expression_function_bodies # consider
- unnecessary_this
- prefer_typing_uninitialized_variables
# constructors
- prefer_initializing_formals
- type_init_formals
#- empty_constructor_bodies
- unnecessary_new
- unnecessary_const
# error handling
- avoid_catches_without_on_clauses # avoid
#- use_rethrow_when_possible
# asynchrony
# --- DESIGN
# names
- use_to_and_as_if_applicable
# libraries
# classes
- one_member_abstracts # avoid
- avoid_classes_with_only_static_members # avoid
- public_member_api_docs
# constructors
- prefer_constructors_over_static_methods
# members
- use_setters_to_change_properties
- avoid_setters_without_getters
- avoid_returning_null # avoid
- avoid_returning_this # avoid
# types
- type_annotate_public_apis # prefer
- omit_local_variable_types # avoid
- avoid_types_on_closure_parameters # avoid
#- avoid_return_types_on_setters
- prefer_generic_function_type_aliases
- avoid_private_typedef_functions # prefer
# parameters
- avoid_positional_boolean_parameters # avoid
# equality
- hash_and_equals
- avoid_null_checks_in_equality_operators
analyzer:
# exclude:
# - path/to/excluded/files/**