Skip to content

Commit

Permalink
chore: switch from php-cs-fixer and phpcs to mago
Browse files Browse the repository at this point in the history
Signed-off-by: azjezz <azjezz@protonmail.com>
  • Loading branch information
azjezz committed Dec 29, 2024
1 parent 4a9a669 commit 8cff0d2
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 1,473 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@ jobs:
run: |
make install -j10 -O
- name: "checking coding standards"
run: make coding-standard-check
- name: "install mago"
run: wget -qO- https://carthage.software/mago.sh | bash --install-dir="/usr/local/bin"

- name: "formatting"
run: mago fmt --dry-run

- name: "linting"
run: mago lint --reporting-format=github
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ install: ## inst
COMPOSER_IGNORE_PLATFORM_REQ=php+ composer install

coding-standard-fix: ## apply automated coding standard fixes
PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --config=config/.php_cs.dist.php
./vendor/bin/phpcbf --basepath=. --standard=config/.phpcs.xml
mago fix
mago fmt

coding-standard-check: ## check coding-standard compliance
PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --config=config/.php_cs.dist.php --dry-run
./vendor/bin/phpcs --basepath=. --standard=config/.phpcs.xml
mago lint
mago fmt --dry-run

benchmarks: ## run benchmarks
./vendor/bin/phpbench run --config config/phpbench.json
Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"revolt/event-loop": "^1.0.6"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.9.0",
"friendsofphp/php-cs-fixer": "^3.52.1",
"phpbench/phpbench": "^1.2.15",
"phpunit/phpunit": "^9.6.18",
"vimeo/psalm": "^5.23.1",
Expand Down
Loading

0 comments on commit 8cff0d2

Please sign in to comment.