Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Static code analysis

on: [pull_request]

jobs:
static-code-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Remove composer.json
shell: bash
run: rm composer.json composer.lock
- name: Psalm
uses: docker://jakzal/phpqa:php7.4-alpine
with:
args: psalm --monochrome --no-progress --output-format=text --update-baseline
- name: Check for changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff && exit 1 )"
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $config
->exclude('config')
->exclude('data')
->notPath('3rdparty')
->notPath('build/stubs')
->notPath('composer')
->notPath('vendor')
->in(__DIR__);
Expand Down
1 change: 1 addition & 0 deletions build/files-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
'ocs',
'package-lock.json',
'package.json',
'psalm.xml',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need psalm baseline here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - because it's in the build/ folder which is deleted already. Only new files in the root need to be checked if the release script should either delete them or keep them. I went for the "delete the psalm.xml in the release" way. :)

'public.php',
'README.md',
'remote.php',
Expand Down
Loading