File tree 5 files changed +177
-3
lines changed
5 files changed +177
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : lint
2
+
3
+ on : pull_request
4
+
5
+ jobs :
6
+ phpcs :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v3
10
+ - uses : shivammathur/setup-php@v2
11
+ - run : composer install --prefer-dist
12
+ - name : do
13
+ run : ./vendor/bin/phpcs --report=emacs --standard=phpcs.xml ./ | reviewdog -reporter=github-pr-review -efm='%f:%l:%c:%m'
14
+ - name : try autofix
15
+ run : ./vendor/bin/phpcbf --standard=phpcs.xml ./
16
+ - name : suggester / phpcs
17
+ uses : reviewdog/action-suggester@v1
18
+ with :
19
+ tool_name : phpcs
20
+
21
+ phpstan :
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - uses : actions/checkout@v3
25
+ - uses : shivammathur/setup-php@v2
26
+ - run : composer install --prefer-dist
27
+ - name : do
28
+ run : ./vendor/bin/phpstan analyse --error-format=raw --no-progress | reviewdog -reporter=github-pr-review -f=phpstan
Original file line number Diff line number Diff line change 6
6
"email" : " sters@users.noreply.github.com"
7
7
}
8
8
],
9
+ "scripts" :{
10
+ "phpcs" : " phpcs --report=emacs --standard=phpcs.xml ./" ,
11
+ "phpstan" : " phpstan analyse --error-format=raw --no-progress"
12
+ },
9
13
"autoload" : {
10
14
"psr-4" : {
11
15
"ClassGraph\\ " : " src"
12
16
}
13
17
},
14
18
"require" : {
15
19
"nikic/php-parser" : " ^4.2"
20
+ },
21
+ "require-dev" : {
22
+ "phpstan/phpstan" : " ^1.10" ,
23
+ "squizlabs/php_codesniffer" : " ^3.7"
16
24
}
17
25
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <ruleset name =" PSR12" >
3
+ <arg name =" extensions" value =" php" />
4
+ <rule ref =" PSR12" />
5
+
6
+ <exclude-pattern >*/examples/*</exclude-pattern >
7
+ <exclude-pattern >*/testcase/*</exclude-pattern >
8
+ <exclude-pattern >*/vendor/*</exclude-pattern >
9
+ </ruleset >
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ level : 0
3
+ paths :
4
+ - .
5
+ excludePaths :
6
+ - vendor/*
7
+ - testcase/*
8
+ - examples/*
You can’t perform that action at this time.
0 commit comments