Skip to content

Commit 111f1de

Browse files
committed
feat(psalm): Enforce documenting all thrown exceptions
Signed-off-by: provokateurin <[email protected]>
1 parent 92fa99d commit 111f1de

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

β€Žpsalm.xml

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
errorBaseline="tests/psalm-baseline.xml"
1313
findUnusedBaselineEntry="true"
1414
findUnusedCode="false"
15+
checkForThrowsDocblock="true"
1516
>
1617
<stubs>
1718
<file name="tests/stubs/doctrine_dbal_exception.php" />
@@ -173,5 +174,17 @@
173174
<PossiblyNullPropertyAssignmentValue errorLevel="error"/>
174175
<PossiblyNullPropertyFetch errorLevel="error"/>
175176
<PossiblyNullReference errorLevel="error"/>
177+
<MissingThrowsDocblock>
178+
<errorLevel type="suppress">
179+
<directory name="tests"/>
180+
</errorLevel>
181+
<errorLevel type="suppress">
182+
<referencedClass name="RuntimeException"/>
183+
<referencedClass name="BadMethodCallException"/>
184+
</errorLevel>
185+
<errorLevel type="error">
186+
<directory name="lib"/>
187+
</errorLevel>
188+
</MissingThrowsDocblock>
176189
</issueHandlers>
177190
</psalm>

0 commit comments

Comments
Β (0)