Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Use own psalm instead of a global one
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Oct 16, 2020
commit be3a46038fe570d815b8124b5d2b3e42e7af699b
16 changes: 10 additions & 6 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
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
- name: Set up php7.4
uses: shivammathur/setup-php@master
with:
args: psalm --monochrome --no-progress --output-format=text --update-baseline || ( git diff && exit 1 )
php-version: 7.4
coverage: none
- name: Composer install
run: composer i
- name: Psalm
run: composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )
- name: Check diff
run: git diff -- . ':!lib/composer' && exit 1
- name: Show potential changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"
9 changes: 0 additions & 9 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4811,14 +4811,6 @@
<code>true</code>
</InvalidReturnType>
</file>
<file src="lib/private/Files/Stream/Encryption.php">
<InvalidScalarArgument occurrences="1">
<code>$position</code>
</InvalidScalarArgument>
<UndefinedInterfaceMethod occurrences="1">
<code>$cacheEntry</code>
</UndefinedInterfaceMethod>
</file>
<file src="lib/private/Files/Stream/SeekableHttpStream.php">
<FalsableReturnStatement occurrences="3">
<code>false</code>
Expand Down Expand Up @@ -5960,7 +5952,6 @@
</UndefinedDocblockClass>
</file>
<file src="lib/private/legacy/OC_Files.php">
<EmptyArrayAccess occurrences="2"/>
<InvalidArgument occurrences="3">
<code>$fileInfos</code>
<code>[$fileInfo]</code>
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
},
"require-dev": {
"nextcloud/coding-standard": "^0.3.0",
"psalm/phar": "^3.12"
"vimeo/psalm": "3.15"
},
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l"
"lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm"
}
}
Loading