Skip to content

Enforce code style #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,33 @@ name: checks
on:
- push

env:
COMPOSER_NO_INTERACTION: "1"

jobs:
format:
name: Code style

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none

- run: composer install --ansi --no-progress --prefer-dist

- name: Run PHP_Codesniffer
run: vendor/bin/phpcs

static_analysis:
name: Static analysis

runs-on: ubuntu-latest

env:
COMPOSER_NO_INTERACTION: "1"

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -50,9 +68,6 @@ jobs:

runs-on: ${{ matrix.os }}

env:
COMPOSER_NO_INTERACTION: "1"

steps:
- uses: actions/checkout@v4

Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": false
},
"sort-packages": true
},
"keywords": [
Expand Down Expand Up @@ -45,11 +48,13 @@
"phpunit/phpunit": "^12.1",
"spaze/phpstan-disallowed-calls": "^4.5.0",
"tracy/tracy": "^2.10.9",
"vojtech-dobes/php-codestyle": "~0.2.0",
"vojtech-dobes/php-grammar-processing": "dev-master@dev",
"vojtech-dobes/php-graphql-server": "dev-master@dev",
"vojtech-dobes/phpstan-php-graphql-server": "dev-master@dev"
},
"scripts": {
"fmt": "phpcbf",
"lint": "parallel-lint src tests",
"phpstan": "phpstan analyse --memory-limit 256M",
"test": "composer dump-autoload && phpunit tests"
Expand Down
Loading