Skip to content

Commit 92b6740

Browse files
authored
Merge pull request #21787 from nextcloud/enh/hello-psalm
Hello psalm
2 parents 1f1c087 + 42bb6cd commit 92b6740

19 files changed

+37342
-8
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Static code analysis
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
static-code-analysis:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Checkout submodules
11+
shell: bash
12+
run: |
13+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
14+
git submodule sync --recursive
15+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
16+
- name: Remove composer.json
17+
shell: bash
18+
run: rm composer.json composer.lock
19+
- name: Psalm
20+
uses: docker://jakzal/phpqa:php7.4-alpine
21+
with:
22+
args: psalm --monochrome --no-progress --output-format=text --update-baseline
23+
- name: Check for changes in Psalm baseline
24+
run: |
25+
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff && exit 1 )"

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $config
1313
->exclude('config')
1414
->exclude('data')
1515
->notPath('3rdparty')
16+
->notPath('build/stubs')
1617
->notPath('composer')
1718
->notPath('vendor')
1819
->in(__DIR__);

build/files-checker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
'ocs',
7171
'package-lock.json',
7272
'package.json',
73+
'psalm.xml',
7374
'public.php',
7475
'README.md',
7576
'remote.php',

0 commit comments

Comments
 (0)