-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add psalm annotations to ignored annotation name #422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Please squash both commits together.
What is the reason for Psalm supporting @pure
in addition to @psalm-pure
? Can it really claim that annotation for itself, as opposed to PHPStan (for instance)?
done. This issue appears when using |
Maybe nitpicking, but linked file has other |
Ah yes, that library I should really try out someday 🙂 When I see the rest of the file, there are mostly annotations that are unlikely to be picked by any other tools. There are also annotations that are attributed to Maybe using tool names as consts is a bad idea because of this, in some cases? How about having private const StaticAnalysis = [
// PhpStan, Psalm
'extends' => true,
'implements' => true,
'template' => true,
'use' => true,
// Psalm
'pure' => true,
'immutable' => true,
]; ? |
because @mutation-free and @readonly don't work with psalm IIRC. |
That sounds like a good idea 👍 |
7b34453
to
810557b
Compare
Signed-off-by: azjezz <azjezz@protonmail.com>
Thanks @azjezz ! |
@pure annotation is mainly used by psalm to mark pure functions.