Skip to content

PHPDoc tag have invalid value on PHPMD suppress warning #256

Closed
@GErpeldinger

Description

@GErpeldinger

Bug report

Hello,

First, congratulations on the release of PHPStan 2.0! I was testing it on my project and noticed that PHPStan now detects an error with PHPMD-specific suppression rules.

As you can see in the example that I copied from the PHPMD documentation, there’s no issue with @SuppressWarnings(PHPMD). However, it seems PHPStan raises an error when there's a dot in the annotation, like @SuppressWarnings(PHPMD.UnusedLocalVariable).

Best regards,
G.Erpeldinger

Code snippet that reproduces the problem

https://phpstan.org/r/8ba21fe2-5c43-496e-9827-7f08c3366e33

Expected output

PhpStan doesn't recognize PHPMD specific rule suppression like an error.

Did PHPStan help you today? Did it make you happy in any way?

It always make me happy, maybe a little less when it finds 526 errors after updating to 2.0 but that's the price of a rock-solid code 😜

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions