Skip to content

Commit

Permalink
Add Deptrac
Browse files Browse the repository at this point in the history
  • Loading branch information
tidal committed Jun 20, 2022
1 parent 0dfb811 commit ba7d1ca
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
- name: Check Style
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --dry-run --stop-on-violation --using-cache=no -vvv

- name: Check Dependencies
run: vendor/bin/deptrac --formatter=github-actions --report-uncovered

- name: Run Phan
env:
PHAN_DISABLE_XDEBUG_WARN: 1
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ bash:
$(DC_RUN_PHP) bash
style:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --using-cache=no -vvv
deptrac:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/deptrac --formatter=table --report-uncovered --no-cache
split:
docker-compose -f docker/gitsplit/docker-compose.yaml --env-file ./.env up
FORCE:
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"symfony/polyfill-php80": "^1.16",
"symfony/proxy-manager-bridge": "^4.4|^5.3|^6.0",
"symfony/yaml": "^4.4|^5.3|^6.0",
"qossmic/deptrac-shim": "^0.22.1",
"vimeo/psalm": "^4.0"
},
"suggest": {
Expand Down
79 changes: 79 additions & 0 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

imports:
#- deptrac.baseline.yaml
deptrac:
analyser:
types:
- class
- class_superglobal
- use
- file
- function
- function_superglobal
paths:
- ./src
- ./tests
exclude_files:
- '#.*test.*#'
layers:
- name: API
collectors:
- type: className
regex: ^OpenTelemetry\\API\\*
- name: SDK
collectors:
- type: className
regex: ^OpenTelemetry\\SDK\\*
- name: Context
collectors:
- type: className
regex: ^OpenTelemetry\\Context\\*
- name: SemConv
collectors:
- type: className
regex: ^OpenTelemetry\\SemConv\\*
- name: Contrib
collectors:
- type: className
regex: ^OpenTelemetry\\Contrib\\*
- name: AwsContrib
collectors:
- type: className
regex: ^OpenTelemetry\\Aws\\*
- name: SymfonySdkBundleContrib
collectors:
- type: className
regex: ^OpenTelemetry\\Symfony\\OtelSdkBundle\\*
- name: PsrHttp
collectors:
- type: className
regex: ^Psr\\Http\\*
- name: PsrLog
collectors:
- type: className
regex: ^Psr\\Log\\*
- name: Symfony
collectors:
- type: className
regex: ^Symfony\\*
- name: HttpPlug
collectors:
- type: className
regex: ^Http\\*

ruleset:
API:
- Context
- SemConv
SDK:
- +API
- PsrHttp
- PsrLog
- HttpPlug
Contrib:
- +SDK
AwsContrib:
- +SDK
SymfonySdkBundleContrib:
- +Contrib
- Symfony

0 comments on commit ba7d1ca

Please # to comment.