integration_openproject/psalm.xml

96 строки
4.5 KiB
XML

<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config"
findUnusedBaselineEntry="false"
findUnusedCode="false"
findUnusedVariablesAndParams="true"
autoloader="bootstrap.php"
>
<projectFiles>
<directory name="lib" />
<directory name="tests" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<stubs>
<file name="tests/stub/doctrine_cacheItem.phpstub" preloadClasses="true"/>
<file name="tests/stub/timejob_joblist.phpstub" preloadClasses="true"/>
</stubs>
<issueHandlers>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="OC\Http\Client\LocalAddressChecker" />
<!-- these classes belong to the terms_of_service app, which isn't compulsory, so might not exist while running psalm -->
<referencedClass name="OCA\TermsOfService\Events\TermsCreatedEvent" />
<referencedClass name="OCA\TermsOfService\Events\SignaturesResetEvent" />
<referencedClass name="OCA\TermsOfService\Db\Mapper\SignatoryMapper" />
<referencedClass name="OCA\TermsOfService\Db\Entities\Signatory" />
<referencedClass name="OCA\TermsOfService\Db\Mapper\TermsMapper" />
<!-- these classes belong to the activity app, which isn't compulsory, so might not exist while running psalm -->
<referencedClass name="OCA\Activity\UserSettings" />
<referencedClass name="OCA\Activity\GroupHelperDisabled" />
<referencedClass name="OCA\Activity\Data" />
<!-- these classes belong to the groupfolders app, which isn't compulsory, so might not exist while running psalm -->
<referencedClass name="OCA\GroupFolders\Folder\FolderManager" />
<referencedClass name="Helmich\JsonAssert\JsonAssertions" />
<!-- these classes belong to the event app, which isn't compulsory, so might not exist while running psalm -->
<referencedClass name="OCP\App\Events\AppEnableEvent" />
<referencedClass name="OCA\AdminAudit\AuditLogger" />
<!-- this class is only in Nextcloud version 31 and does not exist while running psalm on lower version-->
<referencedClass name="OCP\ServerVersion" />
</errorLevel>
</UndefinedClass>
<UndefinedMethod>
<errorLevel type="suppress">
<referencedMethod name="OC\legacy\OC_Util::getVersion()"/>
</errorLevel>
</UndefinedMethod>
<TooFewArguments>
<errorLevel type="suppress">
<!-- supress because constructor needs more arguments on nc version 27 > and the code has conditions to handel this for lower versions-->
<referencedFunction name="OCA\GroupFolders\Folder\FolderManager::__construct"/>
<referencedFunction name="OC\Http\Client\Client::__construct"/>
<referencedFunction name="OCA\DAV\Controller\DirectController::__construct"/>
</errorLevel>
</TooFewArguments>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<referencedClass name="OC\Http\Client\LocalAddressChecker" />
</errorLevel>
</UndefinedDocblockClass>
<InvalidArgument>
<errorLevel type="suppress">
<referencedFunction name="OC\Http\Client\Client::__construct"/>
<!-- setBody() expects iterable but we want to have raw data here and it seems to work fine-->
<referencedFunction name="PhpPact\Consumer\Model\ProviderResponse::setBody"/>
</errorLevel>
</InvalidArgument>
<NoValue>
<errorLevel type="suppress">
<!-- make psalm not complain if activity app does not exist -->
<file name="lib/Controller/FilesController.php"/>
</errorLevel>
</NoValue>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<!-- make psalm not complain if groupfolders app does not exist -->
<referencedClass name="OCA\GroupFolders\Folder\FolderManager"/>
<referencedClass name="OC\Http\Client\LocalAddressChecker"/>
<!-- these are classes form terms_of_service app, which isn't cloned while doing static code analysis -->
<referencedClass name="OCA\TermsOfService\Db\Mapper\SignatoryMapper" />
<!-- these are classes form activity app, which isn't cloned while doing static code analysis -->
<referencedClass name="OCA\Activity\UserSettings" />
<referencedClass name="OCA\Activity\GroupHelperDisabled" />
<referencedClass name="OCA\Activity\Data" />
<!-- this class is only in Nextcloud version 31 and does not exist while running psalm on lower version-->
<referencedClass name="OCP\ServerVersion" />
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>