Skip to content

Commit 7ad1913

Browse files
committed
use level 4 by default and level info instead of suppress
exclude tests dir by default as it requires other Psalm plugins plus makes dead code detection less usable
1 parent a3b6434 commit 7ad1913

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

src/Cli/InitCommand.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)]
2424
final class InitCommand extends Command
2525
{
26-
private const DEFAULT_ERROR_LEVEL = '3';
26+
private const DEFAULT_ERROR_LEVEL = '4';
2727

2828
private const PSALM_XML_TEMPLATE = <<<'XML'
2929
<?xml version="1.0"?>
@@ -41,6 +41,7 @@ final class InitCommand extends Command
4141
<directory name="vendor"/>
4242
<directory name="storage"/>
4343
<directory name="bootstrap/cache"/>
44+
<directory name="tests"/><!-- install psalm/plugin-phpunit and psalm/plugin-mockery for the full tests support -->
4445
</ignoreFiles>
4546
</projectFiles>
4647
@@ -49,15 +50,16 @@ final class InitCommand extends Command
4950
</plugins>
5051
5152
<issueHandlers>
52-
<ClassMustBeFinal errorLevel="suppress"/>
53-
<MissingAbstractPureAnnotation errorLevel="suppress"/>
54-
<MissingClosureReturnType errorLevel="suppress"/>
55-
<MissingImmutableAnnotation errorLevel="suppress"/>
56-
<MissingInterfaceImmutableAnnotation errorLevel="suppress"/>
57-
<MissingOverrideAttribute errorLevel="suppress"/>
58-
<MissingPureAnnotation errorLevel="suppress"/>
59-
<RedundantCast errorLevel="suppress"/>
60-
<RedundantCondition errorLevel="suppress"/>
53+
<ClassMustBeFinal errorLevel="info"/>
54+
<ImplicitToStringCast errorLevel="info"/>
55+
<MissingAbstractPureAnnotation errorLevel="info"/>
56+
<MissingClosureReturnType errorLevel="info"/>
57+
<MissingImmutableAnnotation errorLevel="info"/>
58+
<MissingInterfaceImmutableAnnotation errorLevel="info"/>
59+
<MissingOverrideAttribute errorLevel="info"/>
60+
<MissingPureAnnotation errorLevel="info"/>
61+
<RedundantCast errorLevel="info"/>
62+
<RedundantCondition errorLevel="info"/>
6163
<UnnecessaryVarAnnotation errorLevel="suppress"/>
6264
</issueHandlers>
6365
</psalm>

0 commit comments

Comments
 (0)