mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
94f934627c
* Add resolveFromConfigFile config option Treats all paths as relative to the location of the config file, not the current working directory of the process. This commit just changes psalm, further commits will be needed to apply the change to psalter and the LSP server. * Copy asset xml files into project root for testing, delete during teardown Needed since paths are now resolved relative to the position of the file. Not sure why I only saw a test failre for 1.xml - would have expected it for all eight files. * Fix following rebase * Move psalm --init handly code above working directory setting code If there's no psalm.xml yet we can't use the location of psalm.xml to set our working directory * Move Psalm version output code above working directory resolution Working directory doesn't need to be known to output version constant * Rely on new config file based working directory in end to end test * Dont use rely on config dir for --alter - not currently working * Fix code style error * Add failing test for supporting config without `resolveFromConfigFile="true"` * Don't treat config directory as a path to check * Document resolveFromConfigFile setting
139 lines
5.7 KiB
XML
139 lines
5.7 KiB
XML
<?xml version="1.0"?>
|
|
<psalm
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="https://getpsalm.org/schema/config"
|
|
name="Psalm for Psalm"
|
|
useDocblockTypes="true"
|
|
totallyTyped="true"
|
|
strictBinaryOperands="false"
|
|
rememberPropertyAssignmentsAfterCall="true"
|
|
checkForThrowsDocblock="false"
|
|
throwExceptionOnError="0"
|
|
findUnusedCode="true"
|
|
resolveFromConfigFile="true"
|
|
xsi:schemaLocation="https://getpsalm.org/schema/config config.xsd"
|
|
>
|
|
<projectFiles>
|
|
<directory name="src"/>
|
|
<directory name="tests"/>
|
|
<directory name="examples"/>
|
|
<ignoreFiles>
|
|
<file name="src/Psalm/Internal/CallMap.php"/>
|
|
<file name="src/Psalm/Internal/Traverser/CustomTraverser.php"/>
|
|
<file name="tests/ErrorBaselineTest.php"/>
|
|
<file name="vendor/symfony/console/Command/Command.php"/>
|
|
<directory name="src/Psalm/Internal/Stubs"/>
|
|
<directory name="tests/fixtures"/>
|
|
<file name="vendor/felixfbecker/advanced-json-rpc/lib/Dispatcher.php" />
|
|
<directory name="vendor/netresearch/jsonmapper" />
|
|
<directory name="vendor/phpunit" />
|
|
</ignoreFiles>
|
|
</projectFiles>
|
|
|
|
<ignoreExceptions>
|
|
<class name="UnexpectedValueException"/>
|
|
<class name="InvalidArgumentException"/>
|
|
<class name="LogicException"/>
|
|
</ignoreExceptions>
|
|
|
|
<stubs>
|
|
<file name="src/Psalm/Internal/Stubs/Amp.php"/>
|
|
</stubs>
|
|
|
|
<plugins>
|
|
<plugin filename="examples/plugins/FunctionCasingChecker.php"/>
|
|
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
|
|
</plugins>
|
|
|
|
<issueHandlers>
|
|
<MisplacedRequiredParam errorLevel="suppress"/>
|
|
<PossiblyNullOperand errorLevel="suppress"/>
|
|
<MissingConstructor>
|
|
<errorLevel type="suppress">
|
|
<file name="src/Psalm/Internal/Scanner/FunctionDocblockComment.php"/>
|
|
<file name="src/Psalm/Internal/Scanner/VarDocblockComment.php"/>
|
|
<file name="src/Psalm/Storage/FunctionLikeStorage.php"/>
|
|
<file name="src/Psalm/Storage/MethodStorage.php"/>
|
|
<file name="src/Psalm/Storage/PropertyStorage.php"/>
|
|
<file name="src/Psalm/Internal/Scanner/VarDocblockComment.php"/>
|
|
<file name="src/Psalm/Internal/Scope/CaseScope.php"/>
|
|
</errorLevel>
|
|
</MissingConstructor>
|
|
<DeprecatedProperty errorLevel="suppress"/>
|
|
|
|
<UnusedParam>
|
|
<errorLevel type="suppress">
|
|
<directory name="examples"/>
|
|
</errorLevel>
|
|
</UnusedParam>
|
|
|
|
<PossiblyUnusedParam>
|
|
<errorLevel type="suppress">
|
|
<directory name="examples"/>
|
|
</errorLevel>
|
|
</PossiblyUnusedParam>
|
|
|
|
<UnusedClass>
|
|
<errorLevel type="suppress">
|
|
<directory name="examples"/>
|
|
<directory name="src/Psalm/Internal/Fork" />
|
|
<file name="src/Psalm/Plugin/Shepherd.php" />
|
|
<file name="src/Psalm/Plugin/Hook/MethodReturnTypeProviderInterface.php"/>
|
|
</errorLevel>
|
|
</UnusedClass>
|
|
|
|
<UnusedProperty>
|
|
<errorLevel type="info">
|
|
<file name="src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php"/>
|
|
</errorLevel>
|
|
</UnusedProperty>
|
|
|
|
<PossiblyUnusedProperty>
|
|
<errorLevel type="info">
|
|
<file name="src/Psalm/Internal/LanguageServer/LanguageClient.php"/>
|
|
<file name="src/Psalm/Storage/FunctionLikeStorage.php"/>
|
|
<file name="src/Psalm/Type/Atomic/TCallableArray.php"/>
|
|
<file name="src/Psalm/Type/Atomic/TNonEmptyArray.php"/>
|
|
<file name="src/Psalm/Storage/PropertyStorage.php"/>
|
|
</errorLevel>
|
|
</PossiblyUnusedProperty>
|
|
|
|
<MissingThrowsDocblock errorLevel="info"/>
|
|
|
|
<PossiblyUnusedMethod>
|
|
<errorLevel type="info">
|
|
<file name="src/Psalm/Internal/Provider/FileReferenceProvider.php" />
|
|
</errorLevel>
|
|
<errorLevel type="suppress">
|
|
<directory name="src/Psalm/Plugin"/>
|
|
<directory name="src/Psalm/SourceControl/Git/"/>
|
|
<file name="src/Psalm/Internal/LanguageServer/Client/TextDocument.php"/>
|
|
<file name="src/Psalm/Internal/LanguageServer/Server/TextDocument.php"/>
|
|
<referencedMethod name="Psalm\Codebase::getParentInterfaces"/>
|
|
<referencedMethod name="Psalm\Codebase::getMethodParams"/>
|
|
<referencedMethod name="Psalm\Codebase::getMethodReturnType"/>
|
|
<referencedMethod name="Psalm\Codebase::getMethodReturnTypeLocation"/>
|
|
<referencedMethod name="Psalm\Codebase::getDeclaringMethodId"/>
|
|
<referencedMethod name="Psalm\Codebase::getAppearingMethodId"/>
|
|
<referencedMethod name="Psalm\Codebase::getOverriddenMethodIds"/>
|
|
<referencedMethod name="Psalm\Codebase::getCasedMethodId"/>
|
|
<referencedMethod name="Psalm\Codebase::createClassLikeStorage"/>
|
|
<referencedMethod name="Psalm\Codebase::isVariadic"/>
|
|
<referencedMethod name="Psalm\Codebase::getMethodReturnsByRef"/>
|
|
</errorLevel>
|
|
</PossiblyUnusedMethod>
|
|
|
|
<PropertyNotSetInConstructor>
|
|
<errorLevel type="suppress">
|
|
<file name="src/Psalm/Config.php"/>
|
|
</errorLevel>
|
|
</PropertyNotSetInConstructor>
|
|
|
|
<InternalMethod>
|
|
<errorLevel type="suppress">
|
|
<directory name="tests"/>
|
|
</errorLevel>
|
|
</InternalMethod>
|
|
</issueHandlers>
|
|
</psalm>
|