mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +01:00
Add Psalm
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
5491c1accb
commit
3b9deaae79
6 changed files with 1094 additions and 5 deletions
23
.github/workflows/psalm.yml
vendored
Normal file
23
.github/workflows/psalm.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Static analysis
|
||||
on: [push]
|
||||
jobs:
|
||||
static-psalm-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ocp-version: [ 'dev-master' ]
|
||||
name: Nextcloud ${{ matrix.ocp-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@master
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
- name: Install dependencies
|
||||
run: composer i
|
||||
- name: Install dependencies
|
||||
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
|
||||
- name: Run coding standards check
|
||||
run: composer run psalm
|
||||
1
Makefile
1
Makefile
|
|
@ -79,6 +79,7 @@ appstore:
|
|||
--exclude=package-lock.json \
|
||||
--exclude=.php_cs.dist \
|
||||
--exclude=.php_cs.cache \
|
||||
--exclude=psalm.xml \
|
||||
--exclude=README.md \
|
||||
--exclude=src \
|
||||
--exclude=.stylelintignore \
|
||||
|
|
|
|||
|
|
@ -2,9 +2,14 @@
|
|||
"scripts": {
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"cs:fix": "php-cs-fixer fix",
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l"
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||
"psalm": "psalm",
|
||||
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"require-dev": {
|
||||
"nextcloud/coding-standard": "^0.3.0"
|
||||
"nextcloud/coding-standard": "^0.3.0",
|
||||
"vimeo/psalm": "^3.16",
|
||||
"christophwurst/nextcloud": "dev-master"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1029
composer.lock
generated
1029
composer.lock
generated
File diff suppressed because it is too large
Load diff
35
psalm.xml
Normal file
35
psalm.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
totallyTyped="true"
|
||||
errorLevel="5"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
errorBaseline="tests/psalm-baseline.xml"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="lib" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
<extraFiles>
|
||||
<directory name="vendor" />
|
||||
</extraFiles>
|
||||
<issueHandlers>
|
||||
<UndefinedClass>
|
||||
<errorLevel type="suppress">
|
||||
<referencedClass name="OC" />
|
||||
</errorLevel>
|
||||
</UndefinedClass>
|
||||
<UndefinedDocblockClass>
|
||||
<errorLevel type="suppress">
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
|
||||
<referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
|
||||
<referencedClass name="Doctrine\DBAL\Driver\Statement" />
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Table" />
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
</issueHandlers>
|
||||
</psalm>
|
||||
2
tests/psalm-baseline.xml
Normal file
2
tests/psalm-baseline.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="3.16@d03e5ef057d6adc656c0ff7e166c50b73b4f48f3"/>
|
||||
Loading…
Add table
Reference in a new issue