@@ -6,6 +6,7 @@ dart_code_metrics:
6
6
- avoid-accessing-collections-by-constant-index
7
7
- avoid-accessing-other-classes-private-members
8
8
- avoid-async-call-in-sync-function
9
+ # - avoid-banned-annotations # * OK, we just don't have global config
9
10
# - avoid-banned-file-names # * OK, we just don't have global config
10
11
# - avoid-banned-imports # * OK, we just don't have global config
11
12
# - avoid-banned-types # * OK, we just don't have global config
@@ -15,12 +16,15 @@ dart_code_metrics:
15
16
- avoid-cascade-after-if-null
16
17
- avoid-collapsible-if
17
18
- avoid-collection-methods-with-unrelated-types
19
+ # - avoid-collection-mutating-methods # sometimes it's ok
18
20
- avoid-declaring-call-method
19
21
- avoid-double-slash-imports
22
+ - avoid-duplicate-cascades
20
23
- avoid-duplicate-exports
21
24
- avoid-duplicate-mixins
22
25
- avoid-duplicate-named-imports
23
26
- avoid-duplicate-patterns
27
+ - avoid-duplicate-switch-case-conditions
24
28
- avoid-dynamic
25
29
- avoid-equal-expressions
26
30
- avoid-explicit-pattern-field-name
@@ -33,6 +37,7 @@ dart_code_metrics:
33
37
- avoid-identical-exception-handling-blocks
34
38
- avoid-ignoring-return-values
35
39
- avoid-importing-entrypoint-exports
40
+ # - avoid-inferrable-type-arguments # TODO, after config to ignore context.read and context.watch is added
36
41
- avoid-inverted-boolean-checks
37
42
- avoid-keywords-in-wildcard-pattern
38
43
# - avoid-late-keyword
@@ -98,11 +103,12 @@ dart_code_metrics:
98
103
- avoid-unnecessary-futures
99
104
# - avoid-unnecessary-getter # it's ok to have getter for private field
100
105
- avoid-unnecessary-if
101
- - avoid-unnecessary-late
106
+ - avoid-unnecessary-local- late
102
107
- avoid-unnecessary-negations
103
108
- avoid-unnecessary-nullable-return-type
104
109
- avoid-unnecessary-reassignment
105
110
- avoid-unnecessary-return
111
+ - avoid-unnecessary-super
106
112
- avoid-unnecessary-type-assertions
107
113
- avoid-unnecessary-type-casts
108
114
- avoid-unrelated-type-assertions
@@ -126,6 +132,7 @@ dart_code_metrics:
126
132
- test/**
127
133
- match-class-name-pattern
128
134
# - match-getter-setter-field-names # forces API to equals internal code
135
+ # - match-lib-folder-structure # TODO: discuss
129
136
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
130
137
- member-ordering :
131
138
order :
@@ -181,25 +188,32 @@ dart_code_metrics:
181
188
# - no-magic-number: # way too strict for default values of parameters etc.
182
189
- no-object-declaration
183
190
# - parameters-ordering # way too strict
191
+ # - prefer-addition-subtraction-assignments # dunno
184
192
- prefer-async-await
193
+ - prefer-both-inlining-annotations
185
194
- prefer-bytes-builder
186
195
- prefer-commenting-analyzer-ignores
187
196
- prefer-conditional-expressions
197
+ - prefer-correct-callback-field-name
188
198
- prefer-correct-error-name :
189
199
allowed-names :
190
200
- e
191
201
- prefer-correct-for-loop-increment
192
202
- prefer-correct-future-return-type
203
+ # - prefer-correct-handler-name # TODO: not now
193
204
# - prefer-correct-identifier-length # way too pedantic
194
205
# - prefer-correct-json-casts # overkill
206
+ - prefer-correct-setter-parameter-name
195
207
- prefer-correct-stream-return-type
196
208
- prefer-correct-switch-length
197
209
- prefer-correct-test-file-name
198
210
- prefer-correct-type-name
199
211
- prefer-declaring-const-constructor
200
212
- prefer-early-return
201
213
- prefer-enums-by-name
214
+ - prefer-explicit-function-type
202
215
- prefer-explicit-parameter-names
216
+ # - prefer-explicit-type-arguments # inference is better
203
217
- prefer-first
204
218
# - prefer-getter-over-method # way too pedantic
205
219
- prefer-immediate-return
@@ -214,11 +228,14 @@ dart_code_metrics:
214
228
- test/**
215
229
- prefer-named-boolean-parameters
216
230
# - prefer-named-imports # * OK, we just don't have global config
231
+ - prefer-null-aware-spread
217
232
- prefer-parentheses-with-if-null
233
+ # - prefer-prefixed-global-constants # * OK, we just don't have global config
218
234
- prefer-public-exception-classes
219
235
- prefer-return-await
220
236
# - prefer-returning-conditional-expressions # annoying sometimes
221
237
- prefer-simpler-patterns-null-check
238
+ - prefer-specific-cases-first
222
239
- prefer-static-class :
223
240
ignore-private : true
224
241
ignore-names :
@@ -227,11 +244,14 @@ dart_code_metrics:
227
244
- prefer-test-matchers
228
245
- prefer-trailing-comma
229
246
# - prefer-type-over-var # we prefer type inference
247
+ - prefer-typedefs-for-callbacks
248
+ - prefer-unique-test-names
230
249
# - prefer-unwrapping-future-or # we are ok with awaiting values
231
250
- prefer-visible-for-testing-on-members
232
251
- avoid-missing-interpolation :
233
252
exclude :
234
253
- test/**
254
+ # - avoid-missing-test-files # * OK, but should be enabled per project
235
255
- prefer-wildcard-pattern
236
256
- tag-name
237
257
- unnecessary-trailing-comma :
0 commit comments