Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add avoid-banned-imports to metrics #24

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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