Skip to content

Commit

Permalink
Add avoid-banned-imports to metrics (#24)
Browse files Browse the repository at this point in the history
* Add avoid-banned-imports

* Remove punctuation

* Bump version and update CHANGELOG.md

---------

Co-authored-by: Tobias Wawrzinek <[email protected]>
Co-authored-by: Quoc Huynh <[email protected]>
  • Loading branch information
3 people authored Feb 6, 2024
1 parent 4bd044a commit 80b0d9d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.0

* Add [`avoid-banned-imports`](https://dcm.dev/docs/rules/common/avoid-banned-imports/)

## 0.4.0

* Remove deprecated rules
Expand Down
11 changes: 11 additions & 0 deletions lib/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ dart_code_metrics:
- test/**
- integration_test/**
- prefer-trailing-comma
- avoid-banned-imports:
entries:
- paths: ['lib\/domain(\/\w+)+\.dart']
deny: ['^package:\w*\/ui(\/\w+)+\.dart$']
message: 'Do not import UI classes within domain layer'
- paths: ['lib\/infrastructure(\/\w+)+\.dart']
deny: ['^package:\w*\/ui(\/\w+)+\.dart$']
message: 'Do not import UI classes within infrastructure layer'
- paths: ['lib\/domain(\/\w+)+\.dart']
deny: ['^package:\w*\/infrastructure(\/\w+)+\.dart$']
message: 'Do not import infrastructure layer classes within domain layer'

# Flutter
- always-remove-listener
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Lint rules and metrics for Dart and Flutter used internally at cose
repository: https://github.com/cosee/cosee_lints
homepage: https://pub.dev/publishers/cosee.biz/packages
issue_tracker: https://github.com/cosee/cosee_lints/issues
version: 0.4.0
version: 0.5.0
topics:
- lints

Expand Down

0 comments on commit 80b0d9d

Please sign in to comment.