[英]How to make Psalm infer 100% of the codebase in PHP
目前正在运行的诗篇给了我:
Psalm 能够推断出 94.8665% 的代码库的类型
如何在无法推断类型的地方进行调试? 我想要 100% 的类型覆盖率。
这是我的psalm.xml.dist
配置:
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
totallyTyped="true"
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="src" />
<ignoreFiles>
<file name="src/Kernel.php"/>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
谢谢您的支持。
看起来这很“容易”。 只需将errorLevel
降低到 1 并修复所有问题。 总共超过500个。
一旦我点击errorLevel=1
,我的代码库就已经 100% 被推断出来了。
获得的徽章:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.