Skip to content

Commit 7001dfc

Browse files
committed
Add missing dcm lints
1 parent 49c0455 commit 7001dfc

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

packages/netglade_analysis/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
- Add prefer-bloc-extensions
2626
- Add prefer-sealed-bloc-events
2727
- Add prefer-sealed-bloc-state
28+
- Add avoid-assigning-to-static-field
29+
- Add avoid-getter-prefix
30+
- Add avoid-implicitly-nullable-extension-types
31+
- Add avoid-non-final-exception-class-fields
32+
- Add avoid-unnecessary-constructor
33+
- Add avoid-unnecessary-enum-arguments
34+
- Add avoid-unnecessary-enum-prefix
35+
- Add prefer-contains
2836

2937
## 12.0.0
3038
- Minimal Dart 3.5.0

packages/netglade_analysis/lib/dcm.yaml

Lines changed: 15 additions & 5 deletions
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-adjacent-strings
9+
- avoid-assigning-to-static-field
910
- avoid-assignments-as-conditions
1011
- avoid-async-call-in-sync-function
1112
# - avoid-banned-annotations # * OK, we just don't have global config
@@ -29,7 +30,7 @@ dart_code_metrics:
2930
- avoid-double-slash-imports
3031
- avoid-duplicate-cascades
3132
- avoid-duplicate-collection-elements
32-
# - avoid-duplicate-constant-values # ! check later
33+
# - avoid-duplicate-constant-values # ! check later, does not work for us for 2+ parameters as expected
3334
- avoid-duplicate-exports
3435
- avoid-duplicate-initializers
3536
- avoid-duplicate-map-keys
@@ -52,12 +53,15 @@ dart_code_metrics:
5253
- avoid-function-type-in-records
5354
- avoid-future-tostring
5455
- avoid-generics-shadowing
56+
- avoid-getter-prefix:
57+
prefix: "^get"
5558
- avoid-global-state
5659
# - avoid-high-cyclomatic-complexity # For now we catch this on CR.
5760
- avoid-identical-exception-handling-blocks
5861
- avoid-ignoring-return-values:
5962
exclude:
6063
- test/**
64+
- avoid-implicitly-nullable-extension-types
6165
- avoid-importing-entrypoint-exports
6266
- avoid-incorrect-uri
6367
- avoid-inferrable-type-arguments:
@@ -98,6 +102,7 @@ dart_code_metrics:
98102
exclude:
99103
- test/**
100104
# - avoid-non-empty-constructor-bodies # way too pedantic
105+
- avoid-non-final-exception-class-fields
101106
- avoid-non-null-assertion:
102107
skip-checked-fields: true
103108
exclude:
@@ -147,6 +152,9 @@ dart_code_metrics:
147152
- avoid-unnecessary-call
148153
- avoid-unnecessary-collections
149154
- avoid-unnecessary-conditionals
155+
- avoid-unnecessary-constructor
156+
- avoid-unnecessary-enum-arguments
157+
- avoid-unnecessary-enum-prefix
150158
- avoid-unnecessary-extends
151159
- avoid-unnecessary-futures
152160
# - avoid-unnecessary-getter # it's ok to have getter for private field
@@ -266,9 +274,9 @@ dart_code_metrics:
266274
- prefer-async-await
267275
- prefer-boolean-prefixes:
268276
ignored-names:
269-
- value
270-
- result
271-
- "_"
277+
- value
278+
- result
279+
- "_"
272280
prefixes:
273281
# Defaults
274282
- is
@@ -293,6 +301,7 @@ dart_code_metrics:
293301
- prefer-bytes-builder
294302
- prefer-commenting-analyzer-ignores
295303
- prefer-conditional-expressions
304+
- prefer-contains
296305
- prefer-correct-callback-field-name
297306
- prefer-correct-error-name:
298307
allowed-names:
@@ -433,7 +442,7 @@ dart_code_metrics:
433442

434443
### Bloc
435444
- avoid-bloc-public-methods
436-
# - avoid-cubits
445+
# - avoid-cubits # we use cubits in some places
437446
- avoid-duplicate-bloc-event-handlers
438447
# - avoid-empty-build-when
439448
# - avoid-passing-bloc-to-bloc
@@ -519,5 +528,6 @@ dart_code_metrics:
519528
- prefer-caret-version-syntax
520529
# - prefer-correct-package-name # * OK, we just don't have global config
521530
- prefer-correct-screenshots
531+
# - prefer-pinned-version-syntax # we use prefer-caret-version-syntax
522532
- prefer-publish-to-none
523533
- prefer-semver-version

0 commit comments

Comments
 (0)