Skip to content

Instantly share code, notes, and snippets.

@mholubowski
Created August 30, 2022 23:56
Show Gist options
  • Save mholubowski/8e01cf0123375fbbe9ca309d5f45341a to your computer and use it in GitHub Desktop.
Save mholubowski/8e01cf0123375fbbe9ca309d5f45341a to your computer and use it in GitHub Desktop.
Solid Affiliate's psalm.xml
<?xml version="1.0"?>
<!-- See https://psalm.dev/docs/running_psalm/configuration/#projectfiles -->
<psalm
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"
phpVersion="5.6.20"
errorLevel="1"
resolveFromConfigFile="true"
autoloader="psalm-autoloader.php"
hideExternalErrors="true"
>
<projectFiles>
<!-- The files and directories that will be loaded and scanned. -->
<file name="plugin.php"/>
<directory name="app"/>
<directory name="assets"/>
<ignoreFiles>
<!-- Files and directories that will be loaded, but not scanned. -->
<directory name="vendor"/>
<directory name="libraries/action-scheduler"/>
<directory name="libraries/ct"/>
<directory name="tests"/>
<file name="app/lib/ListTables/SolidWPListTable.php"/> <!-- TODO one day make this not suck -->
<file name="app/lib/MikesDataModelTrait.php"/> <!-- TODO one day make this not suck -->
<file name="app/lib/MikesDataModel.php"/> <!-- TODO one day make this not suck -->
<file name="app/lib/Logger.php"/> <!-- TODO add types -->
<file name="app/lib/Integrations/MailChimp.php"/> <!-- TODO add types -->
</ignoreFiles>
</projectFiles>
<extraFiles>
</extraFiles>
<stubs>
<!-- Stub files, loaded in place of the original implementations. -->
<file name="vendor/php-stubs/wordpress-stubs/wordpress-stubs.php"/>
<file name="vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php"/>
<file name="vendor/php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php"/>
<file name="vendor/php-stubs/wp-cli-stubs/wp-cli-i18n-stubs.php"/>
<file name="vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php"/>
<file name="stubs/woocommerce-subscriptions-stubs.php"/>
<file name="stubs/solid-affiliate-psalm-stubs.php"/>
</stubs>
<issueHandlers>
<!-- See https://psalm.dev/docs/running_psalm/dealing_with_code_issues/ -->
<!-- See https://github.com/vimeo/psalm/issues/4265 for the open issue. -->
<InvalidDocblock>
<errorLevel type="suppress">
<directory name="vendor"/>
</errorLevel>
</InvalidDocblock>
<RedundantCastGivenDocblockType errorLevel="suppress" />
<NonInvariantDocblockPropertyType errorLevel="suppress" />
<RedundantCast errorLevel="suppress" />
<MoreSpecificImplementedParamType errorLevel="suppress" />
<TooManyArguments>
<errorLevel type="suppress">
<referencedFunction name="apply_filters" />
</errorLevel>
</TooManyArguments>
</issueHandlers>
</psalm>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment