瀏覽代碼

Use own psalm instead of a global one

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v21.0.0beta1
Christoph Wurst 3 年之前
父節點
當前提交
081e9ac47f
沒有連結到貢獻者的電子郵件帳戶。
共有 4 個檔案被更改,包括 1044 行新增129 行删除
  1. 10
    6
      .github/workflows/static-code-analysis.yml
  2. 0
    9
      build/psalm-baseline.xml
  3. 3
    2
      composer.json
  4. 1031
    112
      composer.lock

+ 10
- 6
.github/workflows/static-code-analysis.yml 查看文件

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

+ 0
- 9
build/psalm-baseline.xml 查看文件

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

+ 3
- 2
composer.json 查看文件

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

+ 1031
- 112
composer.lock
文件差異過大導致無法顯示
查看文件


Loading…
取消
儲存