forked from rectorphp/rector-src
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (62 loc) · 2.63 KB
/
code_analysis.yaml
File metadata and controls
80 lines (62 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Code Analysis
on:
pull_request: null
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
-
name: 'Composer Validate'
run: composer validate --ansi
-
name: 'Preload php-parser Order'
run: php preload.php
-
name: 'Validate Max File Length'
run: vendor/bin/easy-ci validate-file-length packages rules src tests
-
name: 'PHPStan'
run: vendor/bin/phpstan analyse --ansi --error-format symplify
-
name: 'PHPStan for config'
run: composer phpstan-config
-
name: 'Commented Code'
run: vendor/bin/easy-ci check-commented-code src packages rules tests packages-tests rules-tests --line-limit 5 --ansi
-
name: 'Active Classes'
run: vendor/bin/easy-ci check-active-class bin config src packages rules --ansi
-
name: 'Compatible PHPStan versions'
run: php bin/validate-phpstan-version.php
-
name: 'Detect Rules Missing in Set'
run: bin/rector missing-in-set --ansi
# see https://github.com/rectorphp/rector-generator
-
name: 'Rector Generate From Recipe'
run: |
bin/rector init-recipe --ansi
bin/rector generate --ansi
-
name: 'Detect unused dependencies'
# "default" format overrides default "github" in CI
run: vendor/bin/composer-unused --ansi --output-format=default
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v2"
- run: ${{ matrix.actions.run }}