95 lines
No EOL
2.5 KiB
YAML
95 lines
No EOL
2.5 KiB
YAML
deptrac:
|
|
paths:
|
|
- ./src
|
|
|
|
exclude_files:
|
|
- '#.*test.*#'
|
|
|
|
layers:
|
|
- name: Core
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Core\\\\.*/"
|
|
|
|
- name: Domain
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Modules\\\\.*\\\\Domain\\\\.*/"
|
|
|
|
- name: Application
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Modules\\\\.*\\\\Application\\\\.*/"
|
|
|
|
- name: Repository
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Modules\\\\.*\\\\Infrastructure\\\\Database\\\\.*(?:Repository|Persister)$/"
|
|
|
|
- name: Infrastructure
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Modules\\\\.*\\\\Infrastructure\\\\(?!Database\\\\.*(?:Repository|Persister)$).*/"
|
|
|
|
- name: ServiceProvider
|
|
collectors:
|
|
- type: classNameRegex
|
|
value: "/^Foundation\\\\Modules\\\\.*\\\\.*ServiceProvider$/"
|
|
|
|
ruleset:
|
|
# Core can be used by anyone
|
|
Core:
|
|
- Domain
|
|
- Application
|
|
- Repository
|
|
- Infrastructure
|
|
- ServiceProvider
|
|
|
|
# Domain Layer: Must be completely independent
|
|
Domain: []
|
|
|
|
# Application Layer: Can depend on Domain only
|
|
Application:
|
|
- Core
|
|
- Domain
|
|
|
|
# Repository Layer: Can depend on Domain, Application, and Infrastructure (for implementing repository interfaces)
|
|
Repository:
|
|
- Core
|
|
- Domain
|
|
- Application
|
|
- Infrastructure
|
|
|
|
# Infrastructure Layer: Can depend on Application and itself (no direct Domain access)
|
|
Infrastructure:
|
|
- Core
|
|
- Application
|
|
|
|
# Service Providers can depend on all layers for registration
|
|
ServiceProvider:
|
|
- Core
|
|
- Domain
|
|
- Application
|
|
- Repository
|
|
- Infrastructure
|
|
|
|
skip_violations:
|
|
# Baseline violations (existing code that needs refactoring)
|
|
Foundation\Modules\WelcomeScreen\Infrastructure\Database\Command\SetAllActivitiesAsReadInDatabase:
|
|
- Foundation\Modules\WelcomeScreen\Domain\Activity
|
|
Foundation\Modules\WelcomeScreen\Infrastructure\Database\Query\FetchAllActivitiesFromDatabase:
|
|
- Foundation\Modules\WelcomeScreen\Domain\Activity
|
|
|
|
formatters:
|
|
graphviz:
|
|
pointToGroups: true
|
|
groups:
|
|
Core:
|
|
- Core
|
|
Module_Layers:
|
|
- Domain
|
|
- Application
|
|
- Repository
|
|
- Infrastructure
|
|
Service_Registration:
|
|
- ServiceProvider |