Skip to content

Commit affb5d3

Browse files
committed
[Composer] Added one command to run them all (checks)
1 parent 38996c9 commit affb5d3

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

composer.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,28 @@
9393
"check-cs": "@fix-cs --dry-run",
9494
"phpstan": "phpstan analyse",
9595
"deptrac": "deptrac analyse",
96-
"check-rector": "rector process --dry-run --ansi"
96+
"check-rector": "rector process --dry-run --ansi",
97+
"composer-update": "[ -d vendor ] || composer update",
98+
"yarn-install": "[ -d node_modules ] || yarn install",
99+
"markdownlint": [
100+
"@yarn-install",
101+
"yarn markdownlint"
102+
],
103+
"test": [
104+
"@composer-update",
105+
"EXIT=0; composer check-cs || EXIT=1; composer phpstan || EXIT=1; composer deptrac || EXIT=1; composer check-rector || EXIT=1; composer markdownlint || EXIT=1; exit $EXIT"
106+
]
97107
},
98108
"scripts-descriptions": {
99109
"fix-cs": "Automatically fixes code style in all files",
100110
"check-cs": "Run code style checker for all files",
101111
"phpstan": "Run static code analysis",
102112
"deptrac": "Run Deptrac architecture testing",
103-
"check-rector": "Check for code refactoring opportunities"
113+
"check-rector": "Check for code refactoring opportunities",
114+
"composer-update": "Install composer dependencies if not already installed",
115+
"yarn-install": "Install yarn dependencies if not already installed",
116+
"markdownlint": "Run Markdownlint on all documentation files",
117+
"test": "Run all checks (CS-Fixer, PHPStan, Deptrac, Rector, Markdownlint), continuing past failures and reporting failure overall if any check failed"
104118
},
105119
"config": {
106120
"allow-plugins": false

0 commit comments

Comments
 (0)