Merge pull request #23401 from nextcloud/techdebt/psalm-no-global

Use own psalm instead of a global one
This commit is contained in:
Morris Jobke 2020-10-13 23:34:17 +02:00 committed by GitHub
commit 78a044900f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1014 additions and 99 deletions

View File

@ -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'
- 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)"

View File

@ -4610,14 +4610,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>
@ -5680,7 +5672,6 @@
</UndefinedDocblockClass>
</file>
<file src="lib/private/legacy/OC_Files.php">
<EmptyArrayAccess occurrences="2"/>
<InvalidArgument occurrences="3">
<code>$fileInfos</code>
<code>[$fileInfo]</code>

View File

@ -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"
}
}

1083
composer.lock generated

File diff suppressed because it is too large Load Diff