Skip to content

Commit 6da41d6

Browse files
committed
Adhere to DCM 1.11.0
1 parent 8364e8c commit 6da41d6

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

lib/dcm.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dart_code_metrics:
66
- avoid-accessing-collections-by-constant-index
77
- avoid-accessing-other-classes-private-members
88
- avoid-async-call-in-sync-function
9+
# - avoid-banned-annotations # * OK, we just don't have global config
910
# - avoid-banned-file-names # * OK, we just don't have global config
1011
# - avoid-banned-imports # * OK, we just don't have global config
1112
# - avoid-banned-types # * OK, we just don't have global config
@@ -15,12 +16,15 @@ dart_code_metrics:
1516
- avoid-cascade-after-if-null
1617
- avoid-collapsible-if
1718
- avoid-collection-methods-with-unrelated-types
19+
# - avoid-collection-mutating-methods # sometimes it's ok
1820
- avoid-declaring-call-method
1921
- avoid-double-slash-imports
22+
- avoid-duplicate-cascades
2023
- avoid-duplicate-exports
2124
- avoid-duplicate-mixins
2225
- avoid-duplicate-named-imports
2326
- avoid-duplicate-patterns
27+
- avoid-duplicate-switch-case-conditions
2428
- avoid-dynamic
2529
- avoid-equal-expressions
2630
- avoid-explicit-pattern-field-name
@@ -33,6 +37,7 @@ dart_code_metrics:
3337
- avoid-identical-exception-handling-blocks
3438
- avoid-ignoring-return-values
3539
- avoid-importing-entrypoint-exports
40+
# - avoid-inferrable-type-arguments # TODO, after config to ignore context.read and context.watch is added
3641
- avoid-inverted-boolean-checks
3742
- avoid-keywords-in-wildcard-pattern
3843
# - avoid-late-keyword
@@ -98,11 +103,12 @@ dart_code_metrics:
98103
- avoid-unnecessary-futures
99104
# - avoid-unnecessary-getter # it's ok to have getter for private field
100105
- avoid-unnecessary-if
101-
- avoid-unnecessary-late
106+
- avoid-unnecessary-local-late
102107
- avoid-unnecessary-negations
103108
- avoid-unnecessary-nullable-return-type
104109
- avoid-unnecessary-reassignment
105110
- avoid-unnecessary-return
111+
- avoid-unnecessary-super
106112
- avoid-unnecessary-type-assertions
107113
- avoid-unnecessary-type-casts
108114
- avoid-unrelated-type-assertions
@@ -126,6 +132,7 @@ dart_code_metrics:
126132
- test/**
127133
- match-class-name-pattern
128134
# - match-getter-setter-field-names # forces API to equals internal code
135+
# - match-lib-folder-structure # TODO: discuss
129136
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
130137
- member-ordering:
131138
order:
@@ -181,25 +188,32 @@ dart_code_metrics:
181188
#- no-magic-number: # way too strict for default values of parameters etc.
182189
- no-object-declaration
183190
# - parameters-ordering # way too strict
191+
# - prefer-addition-subtraction-assignments # dunno
184192
- prefer-async-await
193+
- prefer-both-inlining-annotations
185194
- prefer-bytes-builder
186195
- prefer-commenting-analyzer-ignores
187196
- prefer-conditional-expressions
197+
- prefer-correct-callback-field-name
188198
- prefer-correct-error-name:
189199
allowed-names:
190200
- e
191201
- prefer-correct-for-loop-increment
192202
- prefer-correct-future-return-type
203+
# - prefer-correct-handler-name # TODO: not now
193204
# - prefer-correct-identifier-length # way too pedantic
194205
# - prefer-correct-json-casts # overkill
206+
- prefer-correct-setter-parameter-name
195207
- prefer-correct-stream-return-type
196208
- prefer-correct-switch-length
197209
- prefer-correct-test-file-name
198210
- prefer-correct-type-name
199211
- prefer-declaring-const-constructor
200212
- prefer-early-return
201213
- prefer-enums-by-name
214+
- prefer-explicit-function-type
202215
- prefer-explicit-parameter-names
216+
# - prefer-explicit-type-arguments # inference is better
203217
- prefer-first
204218
# - prefer-getter-over-method # way too pedantic
205219
- prefer-immediate-return
@@ -214,11 +228,14 @@ dart_code_metrics:
214228
- test/**
215229
- prefer-named-boolean-parameters
216230
# - prefer-named-imports # * OK, we just don't have global config
231+
- prefer-null-aware-spread
217232
- prefer-parentheses-with-if-null
233+
# - prefer-prefixed-global-constants # * OK, we just don't have global config
218234
- prefer-public-exception-classes
219235
- prefer-return-await
220236
# - prefer-returning-conditional-expressions # annoying sometimes
221237
- prefer-simpler-patterns-null-check
238+
- prefer-specific-cases-first
222239
- prefer-static-class:
223240
ignore-private: true
224241
ignore-names:
@@ -227,11 +244,14 @@ dart_code_metrics:
227244
- prefer-test-matchers
228245
- prefer-trailing-comma
229246
# - prefer-type-over-var # we prefer type inference
247+
- prefer-typedefs-for-callbacks
248+
- prefer-unique-test-names
230249
# - prefer-unwrapping-future-or # we are ok with awaiting values
231250
- prefer-visible-for-testing-on-members
232251
- avoid-missing-interpolation:
233252
exclude:
234253
- test/**
254+
# - avoid-missing-test-files # * OK, but should be enabled per project
235255
- prefer-wildcard-pattern
236256
- tag-name
237257
- unnecessary-trailing-comma:

0 commit comments

Comments
 (0)