Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow suppressing MissingThrowsDocblock for individual exceptions #9303

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
<xs:element name="MissingPropertyType" type="PropertyIssueHandlerType" minOccurs="0" />
<xs:element name="MissingReturnType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingTemplateParam" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingThrowsDocblock" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingThrowsDocblock" type="ClassIssueHandlerType" minOccurs="0" />
<xs:element name="MixedArgument" type="ArgumentIssueHandlerType" minOccurs="0" />
<xs:element name="MixedArgumentTypeCoercion" type="ArgumentIssueHandlerType" minOccurs="0" />
<xs:element name="MixedArrayAccess" type="IssueHandlerType" minOccurs="0" />
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ public function analyze(
$possibly_thrown_exception . ' is thrown but not caught - please either catch'
. ' or add a @throws annotation',
$codelocation,
$possibly_thrown_exception,
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Issue/MissingThrowsDocblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Psalm\Issue;

final class MissingThrowsDocblock extends CodeIssue
final class MissingThrowsDocblock extends ClassIssue
{
public const SHORTCODE = 169;
}