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

UnusedPsalmSuppress reported in vendor dir #5356

Closed
BenMorel opened this issue Mar 9, 2021 · 5 comments · Fixed by #6344
Closed

UnusedPsalmSuppress reported in vendor dir #5356

BenMorel opened this issue Mar 9, 2021 · 5 comments · Fixed by #6344
Labels

Comments

@BenMorel
Copy link
Contributor

BenMorel commented Mar 9, 2021

I have the following psalm.xml config file:

<?xml version="1.0"?>
...
    <projectFiles>
        <directory name="lib" />
        <directory name="src" />
        <ignoreFiles>
            <directory name="vendor" />
        </ignoreFiles>
    </projectFiles>
</psalm>

On first run, the vendor/bin/psalm --find-unused-psalm-suppress command returns the following error:

ERROR: UnusedPsalmSuppress - vendor/myclabs/php-enum/src/Enum.php:65:33 - This suppression is never used (see https://psalm.dev/207)
            /** @psalm-suppress InvalidCast */

I cannot reproduce it on second run. Is this a bug?

@psalm-github-bot
Copy link

Hey @BenMorel, can you reproduce the issue on https://psalm.dev ?

@muglug
Copy link
Collaborator

muglug commented Mar 11, 2021

I cannot reproduce it on second run. Is this a bug?

Yes, anything that changes dependent on caching is a bug

This is a bit of an edge-case, but still a bug

@orklah
Copy link
Collaborator

orklah commented Aug 7, 2021

@BenMorel would you mind creating a small repo that replicate this issue?

@BenMorel
Copy link
Contributor Author

BenMorel commented Aug 9, 2021

@orklah I haven't seen the bug in a while, let's consider it fixed. I'll come back if it appears again!

@simPod
Copy link
Contributor

simPod commented Aug 19, 2021

@orklah I've managed to reproduce it here simPod/PsalmBugs#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants