Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit c96e7d5

Browse files
Next-gen coding standard workflow
1 parent c9375c2 commit c96e7d5

File tree

9 files changed

+21
-466
lines changed

9 files changed

+21
-466
lines changed

‎.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ tmp export-ignore
66
.gitattributes export-ignore
77
.gitignore export-ignore
88
Makefile export-ignore
9-
phpcs.xml export-ignore
109
phpstan.neon export-ignore
1110
phpunit.xml export-ignore

‎.github/renovate.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"enabled": true,
1111
"groupName": "root-composer"
1212
},
13-
{
14-
"matchPaths": ["build-cs/**"],
15-
"enabled": true,
16-
"groupName": "build-cs"
17-
},
1813
{
1914
"matchPaths": [".github/**"],
2015
"enabled": true,

‎.github/workflows/build.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: "Lint"
4747
run: "make lint"
4848

49-
coding-standards:
49+
coding-standard:
5050
name: "Coding Standard"
5151

5252
runs-on: "ubuntu-latest"
@@ -55,18 +55,28 @@ jobs:
5555
- name: "Checkout"
5656
uses: actions/checkout@v3
5757

58+
- name: "Checkout build-cs"
59+
uses: actions/checkout@v3
60+
with:
61+
repository: "phpstan/build-cs"
62+
path: "build-cs"
63+
5864
- name: "Install PHP"
5965
uses: "shivammathur/setup-php@v2"
6066
with:
6167
coverage: "none"
62-
php-version: "8.0"
68+
php-version: "8.2"
6369

6470
- name: "Validate Composer"
6571
run: "composer validate"
6672

6773
- name: "Install dependencies"
6874
run: "composer install --no-interaction --no-progress"
6975

76+
- name: "Install build-cs dependencies"
77+
working-directory: "build-cs"
78+
run: "composer install --no-interaction --no-progress"
79+
7080
- name: "Lint"
7181
run: "make lint"
7282

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/tests/tmp
2+
/build-cs
23
/vendor
34
/composer.lock
45
.phpunit.result.cache

‎Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ lint:
1010
php vendor/bin/parallel-lint --colors \
1111
src tests
1212

13+
.PHONY: cs-install
14+
cs-install:
15+
git clone https://github.com/phpstan/build-cs.git || true
16+
git -C build-cs fetch origin && git -C build-cs reset --hard origin/main
17+
composer install --working-dir build-cs
18+
1319
.PHONY: cs
1420
cs:
15-
composer install --working-dir build-cs &&php build-cs/vendor/bin/phpcs
21+
php build-cs/vendor/bin/phpcs --standard=build-cs/phpcs.xml src tests
1622

1723
.PHONY: cs-fix
1824
cs-fix:
19-
php build-cs/vendor/bin/phpcbf
25+
php build-cs/vendor/bin/phpcbf --standard=build-cs/phpcs.xml src tests
2026

2127
.PHONY: phpstan
2228
phpstan:

‎build-cs/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎build-cs/composer.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /