Skip to content

Commit

Permalink
Add avoid-banned-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Wawrzinek committed Feb 6, 2024
1 parent 7ba1603 commit 46e7c74
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit 46e7c74

Please sign in to comment.