nextcloud-app/psalm.xml
Rama main · réplica de lectura del repositorio original.
<?xml version="1.0"?>
<!--
findUnusedIssueHandlerSuppression is off because some suppressions below are
environment-dependent: the ext-gd one fires only where gd is missing, so with
the check on, the run fails either on the constant or on the "unused"
suppression, depending on the machine.
-->
<psalm errorLevel="3" findUnusedIssueHandlerSuppression="false"
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">
<projectFiles>
<directory name="lib"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<!--
nextcloud/ocp ships no `autoload` section — it is published for static
analysers, which read the sources directly. Parsing vendor/ as extra files
is how psalm resolves `OCP\*` without reporting issues inside vendor/.
-->
<extraFiles>
<directory name="vendor"/>
</extraFiles>
<stubs>
<file name="tests/stubs/oc-private.php"/>
<file name="tests/stubs/oc-global.php"/>
<file name="tests/stubs/guzzle.php"/>
<file name="tests/stubs/cloud-sdks.php"/>
<file name="tests/stubs/talk.php"/>
<file name="tests/stubs/circles.php"/>
</stubs>
<issueHandlers>
<LessSpecificReturnStatement errorLevel="error"/>
<LessSpecificReturnType errorLevel="error"/>
<LessSpecificImplementedReturnType errorLevel="error"/>
<MoreSpecificReturnType errorLevel="error"/>
<!--
Nothing in a Nextcloud app is called from code psalm can see: services are
built by the DI container, controllers by the router, listeners/commands/
widgets/jobs by appinfo registration. Psalm's dead-code detection therefore
reports the whole app as unused.
-->
<UnusedClass errorLevel="suppress"/>
<PossiblyUnusedMethod errorLevel="suppress"/>
<PossiblyUnusedProperty errorLevel="suppress"/>
<PossiblyUnusedParam errorLevel="suppress"/>
<PossiblyUnusedReturnValue errorLevel="suppress"/>
<!--
#[Override] is a psalm 6 style default, not something the Nextcloud
codebase or its app ecosystem uses.
-->
<MissingOverrideAttribute errorLevel="suppress"/>
<!--
Entities extend OCP\AppFramework\Db\Entity, whose columns are magic
properties generated from addType() calls, and the Anthropic SDK models
expose their block fields the same way.
-->
<UndefinedMagicPropertyFetch errorLevel="suppress"/>
<UndefinedMagicPropertyAssignment errorLevel="suppress"/>
<!--
The Anthropic SDK models declare non-nullable typed properties, so psalm
reads every `isset()`/`??` guard over a response field as redundant. PHP
typed properties can still be *uninitialized* — the SDK leaves optional
fields unset — and dropping the guards makes the SDK tests fatal with
"must not be accessed before initialization".
-->
<RedundantCondition>
<errorLevel type="suppress">
<file name="lib/Service/ClaudeSDKService.php"/>
</errorLevel>
</RedundantCondition>
<TypeDoesNotContainType>
<errorLevel type="suppress">
<file name="lib/Service/ClaudeSDKService.php"/>
</errorLevel>
</TypeDoesNotContainType>
<!--
The SDK's createStream() returns its @internal BaseStream interface, and
iterating that return value is the documented way to read a stream.
-->
<InternalMethod>
<errorLevel type="suppress">
<referencedMethod name="Anthropic\Core\Contracts\BaseStream::getIterator"/>
</errorLevel>
</InternalMethod>
<!--
IMG_* constants only exist when ext-gd is loaded. Nextcloud requires gd,
but the analysis environment need not have it, so keep the result the same
either way.
-->
<UndefinedConstant>
<errorLevel type="suppress">
<file name="lib/Service/ImageOptimizer.php"/>
</errorLevel>
</UndefinedConstant>
</issueHandlers>
</psalm>