Skip to content

Commit

Permalink
add psalm baseline
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed May 29, 2024
1 parent 199f14e commit a5d15d0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer run text:unit
run: composer run test:unit
4 changes: 2 additions & 2 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
ocp-version: [ '^28', 'dev-master' ]
ocp-version: [ 'dev-master' ]
php-version: [ '8.0', '8.1', '8.2', '8.3' ]


Expand All @@ -63,7 +63,7 @@ jobs:
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies

- name: Install dependencies
run: composer require --dev
run: composer require --dev

- name: Run coding standards check
run: composer run psalm
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"cs:fix": "php-cs-fixer fix",
"test:unit": "phpunit --config tests/phpunit.xml",
"psalm": "psalm.phar --no-cache",
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline",
"psalm:update-baseline:force": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"post-install-cmd": [
"@composer bin all install --ansi",
"composer dump-autoload"
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<psalm
errorBaseline="tests/psalm-baseline.xml"
errorLevel="4"
findUnusedBaselineEntry="true"
findUnusedCode="false"
Expand Down Expand Up @@ -29,6 +30,7 @@
<referencedClass name="Symfony\Component\Console\Command\Command" />
<referencedClass name="GuzzleHttp\Exception\ServerException" />
<referencedClass name="GuzzleHttp\Exception\ClientException" />
<referencedClass name="OCP\TaskProcessing\ISynchronousProvider" />
</errorLevel>
</UndefinedClass>
<UndefinedDocblockClass>
Expand Down
51 changes: 51 additions & 0 deletions tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
<file src="lib/AppInfo/Application.php">
<MissingDependency>
<code><![CDATA[HeadlineProvider]]></code>
<code><![CDATA[STTProvider]]></code>
<code><![CDATA[SummaryProvider]]></code>
<code><![CDATA[TextToImageProvider]]></code>
<code><![CDATA[TextToTextProvider]]></code>
<code><![CDATA[TopicsProvider]]></code>
</MissingDependency>
<UndefinedInterfaceMethod>
<code><![CDATA[registerTaskProcessingProvider]]></code>
<code><![CDATA[registerTaskProcessingProvider]]></code>
<code><![CDATA[registerTaskProcessingProvider]]></code>
<code><![CDATA[registerTaskProcessingProvider]]></code>
<code><![CDATA[registerTaskProcessingProvider]]></code>
<code><![CDATA[registerTaskProcessingProvider]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="lib/TaskProcessing/HeadlineProvider.php">
<InvalidDocblock>
<code><![CDATA[class HeadlineProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
<file src="lib/TaskProcessing/STTProvider.php">
<InvalidDocblock>
<code><![CDATA[class STTProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
<file src="lib/TaskProcessing/SummaryProvider.php">
<InvalidDocblock>
<code><![CDATA[class SummaryProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
<file src="lib/TaskProcessing/TextToImageProvider.php">
<InvalidDocblock>
<code><![CDATA[class TextToImageProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
<file src="lib/TaskProcessing/TextToTextProvider.php">
<InvalidDocblock>
<code><![CDATA[class TextToTextProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
<file src="lib/TaskProcessing/TopicsProvider.php">
<InvalidDocblock>
<code><![CDATA[class TopicsProvider implements ISynchronousProvider {]]></code>
</InvalidDocblock>
</file>
</files>

0 comments on commit a5d15d0

Please sign in to comment.