File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,13 @@ jobs:
108
108
phpstan-result-cache-
109
109
110
110
- name : Run PHPStan
111
- run : ./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi
111
+ run : ./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi --error-format=sarif > phpstan.sarif
112
+
113
+ - name : " Upload SARIF report"
114
+ if : always()
115
+ uses : " github/codeql-action/upload-sarif@v3"
116
+ with :
117
+ sarif_file : phpstan.sarif
112
118
113
119
- name : Save cache PHPStan results
114
120
id : phpstan-cache-save
Original file line number Diff line number Diff line change 39
39
"mockery/mockery" : " ^1.4.4" ,
40
40
"doctrine/coding-standard" : " 12.0.x-dev" ,
41
41
"spatie/laravel-query-builder" : " ^5.6" ,
42
- "phpstan/phpstan" : " ^1.10"
42
+ "phpstan/phpstan" : " 1.11.x-dev" ,
43
+ "jbelien/phpstan-sarif-formatter" : " ^1.0"
43
44
},
44
45
"suggest" : {
45
46
"mongodb/builder" : " Provides a fluent aggregation builder for MongoDB pipelines"
Original file line number Diff line number Diff line change @@ -14,3 +14,11 @@ parameters:
14
14
ignoreErrors:
15
15
- '#Unsafe usage of new static#'
16
16
- '#Call to an undefined method [a-zA-Z0-9\\_\<\>]+::[a-zA-Z]+\(\)#'
17
+
18
+ services:
19
+ errorFormatter.sarif:
20
+ class: PHPStanSarifErrorFormatter\SarifErrorFormatter
21
+ arguments:
22
+ relativePathHelper: @simpleRelativePathHelper
23
+ currentWorkingDirectory: %currentWorkingDirectory%
24
+ pretty: true
You can’t perform that action at this time.
0 commit comments