1
- # version 1.8 .0 - https://dcm.dev/changelog/
1
+ # version 1.10 .0 - https://dcm.dev/changelog/
2
2
dart_code_metrics :
3
3
rules :
4
4
# ## Common
5
5
# - arguments-ordering # way too pedantic
6
+ - avoid-accessing-collections-by-constant-index
6
7
- avoid-accessing-other-classes-private-members
7
8
- avoid-async-call-in-sync-function
8
9
# - avoid-banned-file-names
@@ -24,6 +25,7 @@ dart_code_metrics:
24
25
- avoid-equal-expressions
25
26
- avoid-explicit-pattern-field-name
26
27
# - avoid-explicit-type-declaration # public API
28
+ - avoid-extensions-on-records
27
29
- avoid-function-type-in-records
28
30
- avoid-future-tostring
29
31
- avoid-generics-shadowing
@@ -34,6 +36,8 @@ dart_code_metrics:
34
36
- avoid-inverted-boolean-checks
35
37
- avoid-keywords-in-wildcard-pattern
36
38
# - avoid-late-keyword
39
+ - avoid-local-functions
40
+ # - avoid-long-files # hard to get the right settings
37
41
# - avoid-long-functions # way too pedantic
38
42
# - avoid-long-parameter-list: # way too pedantic
39
43
# ignore-optional: true # exclude optional and (non-required) named parameters
@@ -56,9 +60,11 @@ dart_code_metrics:
56
60
exclude :
57
61
- test/**
58
62
- avoid-non-null-assertion :
63
+ skip-checked-fields : true
59
64
exclude :
60
65
- test/**
61
66
- avoid-nullable-interpolation
67
+ - avoid-nullable-parameters-with-default-values
62
68
- avoid-one-field-records
63
69
- avoid-passing-async-when-sync-expected :
64
70
exclude :
@@ -90,7 +96,9 @@ dart_code_metrics:
90
96
- avoid-unnecessary-call
91
97
- avoid-unnecessary-conditionals
92
98
- avoid-unnecessary-futures
99
+ # - avoid-unnecessary-getter # it's ok to have getter for private field
93
100
- avoid-unnecessary-if
101
+ - avoid-unnecessary-late
94
102
- avoid-unnecessary-negations
95
103
- avoid-unnecessary-nullable-return-type
96
104
- avoid-unnecessary-reassignment
@@ -104,6 +112,7 @@ dart_code_metrics:
104
112
- avoid-unused-instances
105
113
- avoid-unused-parameters
106
114
- avoid-weak-cryptographic-algorithms
115
+ - avoid-wildcard-cases-with-enums
107
116
# - banned-usage
108
117
- binary-expression-operand-order
109
118
- double-literal-format
@@ -116,6 +125,7 @@ dart_code_metrics:
116
125
exclude :
117
126
- test/**
118
127
- match-class-name-pattern
128
+ # - match-getter-setter-field-names # forces API to equals internal code
119
129
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
120
130
- member-ordering :
121
131
order :
@@ -179,7 +189,7 @@ dart_code_metrics:
179
189
- prefer-correct-for-loop-increment
180
190
- prefer-correct-future-return-type
181
191
# - prefer-correct-identifier-length # way too pedantic
182
- # - prefer-correct-json-casts # overkill213
192
+ # - prefer-correct-json-casts # overkill
183
193
- prefer-correct-stream-return-type
184
194
- prefer-correct-switch-length
185
195
- prefer-correct-test-file-name
@@ -189,7 +199,7 @@ dart_code_metrics:
189
199
- prefer-enums-by-name
190
200
- prefer-explicit-parameter-names
191
201
- prefer-first
192
- # - prefer-getter-over-method # TODO: triggers for private, to__(), as__() methods
202
+ # - prefer-getter-over-method # way to pedantic
193
203
- prefer-immediate-return
194
204
- prefer-iterable-of
195
205
- prefer-last
@@ -201,6 +211,7 @@ dart_code_metrics:
201
211
exclude :
202
212
- test/**
203
213
- prefer-named-boolean-parameters
214
+ # - prefer-named-imports # ok, but we don't have a usecase now
204
215
- prefer-parentheses-with-if-null
205
216
- prefer-public-exception-classes
206
217
- prefer-return-await
@@ -237,6 +248,7 @@ dart_code_metrics:
237
248
- avoid-recursive-widget-calls
238
249
- avoid-returning-widgets
239
250
- avoid-shrink-wrap-in-lists
251
+ - avoid-single-child-column-or-row
240
252
- avoid-state-constructors
241
253
- avoid-stateless-widget-initialized-fields
242
254
- avoid-unnecessary-overrides-in-state
@@ -254,6 +266,7 @@ dart_code_metrics:
254
266
- prefer-extracting-callbacks
255
267
- prefer-single-widget-per-file :
256
268
ignore-private-widgets : true
269
+ - prefer-sliver-prefix
257
270
- prefer-text-rich
258
271
- prefer-using-list-view
259
272
# - prefer-widget-private-members # cannot use this.field in constructor
@@ -292,11 +305,16 @@ dart_code_metrics:
292
305
# # Fake Async
293
306
- avoid-async-callback-in-fake-async
294
307
308
+ # # Get It
309
+ - avoid-functions-in-register-singleton :
310
+ severity : error
311
+
295
312
# ## Intl - not used
296
313
# - prefer-date-format
297
314
# - prefer-intl-name
298
315
# - prefer-number-format
299
- # - prefer-provide-intl-description
316
+ # - prefer-providing-intl-description
317
+ # - prefer-providing-intl-examples
300
318
# - provide-correct-intl-args
301
319
302
320
# ## Angular - not used
0 commit comments