Skip to content

Commit

Permalink
feat(psalm): Enforce documenting all thrown exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Sep 21, 2024
1 parent 92fa99d commit 111f1de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
errorBaseline="tests/psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="false"
checkForThrowsDocblock="true"
>
<stubs>
<file name="tests/stubs/doctrine_dbal_exception.php" />
Expand Down Expand Up @@ -173,5 +174,17 @@
<PossiblyNullPropertyAssignmentValue errorLevel="error"/>
<PossiblyNullPropertyFetch errorLevel="error"/>
<PossiblyNullReference errorLevel="error"/>
<MissingThrowsDocblock>
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
<errorLevel type="suppress">
<referencedClass name="RuntimeException"/>
<referencedClass name="BadMethodCallException"/>
</errorLevel>
<errorLevel type="error">
<directory name="lib"/>
</errorLevel>
</MissingThrowsDocblock>
</issueHandlers>
</psalm>

0 comments on commit 111f1de

Please sign in to comment.