Skip to content

Commit 28cfc44

Browse files
authored
Merge 2c808ed into 06887a2
2 parents 06887a2 + 2c808ed commit 28cfc44

File tree

6 files changed

+5037
-3
lines changed

6 files changed

+5037
-3
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Static analysis
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
static-psalm-analysis:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ocp-version: [ 'dev-master' ]
11+
name: Nextcloud ${{ matrix.ocp-version }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Set up php
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: 7.4
19+
tools: composer:v1
20+
coverage: none
21+
- name: Install dependencies
22+
run: composer i
23+
- name: Install dependencies
24+
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
25+
- name: Run coding standards check
26+
run: composer run psalm

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
"scripts": {
2626
"cs:check": "php-cs-fixer fix --dry-run --diff",
2727
"cs:fix": "php-cs-fixer fix",
28-
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
28+
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
29+
"psalm": "psalm --threads=1 --update-baseline",
30+
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
31+
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
32+
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
2933
},
3034
"require-dev": {
35+
"vimeo/psalm": "^4.24",
3136
"nextcloud/coding-standard": "^0.5.0",
3237
"phpunit/phpunit": "^9.5"
3338
}

0 commit comments

Comments
 (0)