You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An otherwise valid docblock should not be rendered unused creating mixed/... issues just because there is an invalid "@psalm" annotation.
e.g. in this case the annotation is something that exists in other static analysis (phpstan) but not in psalm however this doesn't have any impact on the rest of the docblock.
This also is relevant if e.g. @psalm-returnss or something is only misspelled - using the default fallback @return would be fine in that case normally, but completely ignoring the docblock is not.
The use case is that we're using a library that added some of those invalid annotations thus breaking the CI.
The text was updated successfully, but these errors were encountered:
Psalm output (using commit ef3b018):
ERROR: InvalidDocblock - 7:1 - Unrecognised annotation @psalm-impure
ERROR: InvalidDocblock - 7:1 - Unrecognised annotation @psalm-impure in docblock for foo
INFO: MissingReturnType - 7:10 - Method foo does not have a return type, expecting 'bar'
INFO: MixedAssignment - 11:1 - Unable to determine the type that $x is being assigned to
INFO: Trace - 12:23 - $x: mixed
INFO: UnusedVariable - 11:1 - $x is never referenced or the value is not used
kkmuffme
added a commit
to kkmuffme/psalm
that referenced
this issue
Apr 6, 2024
https://psalm.dev/r/d773315d3f
An otherwise valid docblock should not be rendered unused creating mixed/... issues just because there is an invalid "@psalm" annotation.
e.g. in this case the annotation is something that exists in other static analysis (phpstan) but not in psalm however this doesn't have any impact on the rest of the docblock.
This also is relevant if e.g.
@psalm-returnss
or something is only misspelled - using the default fallback @return would be fine in that case normally, but completely ignoring the docblock is not.The use case is that we're using a library that added some of those invalid annotations thus breaking the CI.
The text was updated successfully, but these errors were encountered: