Skip to content

Commit

Permalink
Adhere to DCM 1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Apr 10, 2024
1 parent 142512a commit 01fbdb3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/netglade_analysis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 10.0.0
- Adhere to DCM 1.16.0:
- Add avoid-conditions-with-boolean-literals
- Add prefer-for-loop-in-children
- Add avoid-unnecessary-hook-widgets

## 9.0.0
- Adhere to DCM 1.15.0:
- Add avoid-casting-to-extension-type
Expand Down
9 changes: 7 additions & 2 deletions packages/netglade_analysis/lib/dcm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# version 1.15.0 - https://dcm.dev/changelog
# version 1.16.0 - https://dcm.dev/changelog
dart_code_metrics:
rules:
### Common
Expand All @@ -18,6 +18,7 @@ dart_code_metrics:
- avoid-collapsible-if
- avoid-collection-methods-with-unrelated-types
# - avoid-collection-mutating-methods # sometimes it's ok
- avoid-conditions-with-boolean-literals
- avoid-contradictory-expressions
- avoid-declaring-call-method
- avoid-double-slash-imports
Expand Down Expand Up @@ -188,6 +189,7 @@ dart_code_metrics:
- build-method
- private-methods
- missing-test-assertion
# - missing-use-result-annotation # * OK, we just don't have global config
- move-records-to-typedefs:
min-fields: 3
min-occurrences: 3
Expand Down Expand Up @@ -215,7 +217,8 @@ dart_code_metrics:
- no-equal-switch-case
- no-equal-switch-expression-cases
- no-equal-then-else
#- no-magic-number: # way too strict for default values of parameters etc.
#- no-magic-number # way too strict for default values of parameters etc.
#- no-magic-string # way too strict for default values of parameters etc.
- no-object-declaration
# - parameters-ordering # way too strict
# - prefer-addition-subtraction-assignments # dunno
Expand Down Expand Up @@ -326,6 +329,7 @@ dart_code_metrics:
- prefer-dedicated-media-query-methods
- prefer-define-hero-tag
- prefer-extracting-callbacks
- prefer-for-loop-in-children
- prefer-single-widget-per-file:
ignore-private-widgets: true
- prefer-sliver-prefix
Expand Down Expand Up @@ -374,6 +378,7 @@ dart_code_metrics:
### Flutter Hooks
- avoid-conditional-hooks
- avoid-hooks-outside-build
- avoid-unnecessary-hook-widgets
- prefer-use-prefix

### Intl - not used
Expand Down
2 changes: 1 addition & 1 deletion packages/netglade_analysis/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: netglade_analysis
version: 9.0.0
version: 10.0.0
description: Lint rules for Dart and Flutter used internally at netglade.
repository: https://github.com/netglade/flutter_core/tree/main/packages/netglade_analysis
issue_tracker: https://github.com/netglade/flutter_core/issues
Expand Down

0 comments on commit 01fbdb3

Please sign in to comment.