Skip to content

feat: add options to report ignores without identifiers or comments #3976

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

Open
wants to merge 2 commits into
base: 2.1.x
Choose a base branch
from

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Apr 30, 2025

Hello!

Closes phpstan/phpstan#11340

This PR adds the following two options (false by default):

  • reportIgnoresWithoutIdentifiers: reports @phpstan-ignore-line and @phpstan-ignore-next-line usages
  • reportIgnoresWithoutComments: reports @phpstan-ignore usages without comments

Thanks!

@calebdw calebdw force-pushed the calebdw/push-qtlvsunynsrq branch from 94bcb68 to 47d8329 Compare April 30, 2025 18:29
@calebdw
Copy link
Contributor Author

calebdw commented Apr 30, 2025

CI failures look to be unrelated

@calebdw calebdw changed the title feat: add option to report ignores without identifiers feat: add options to report ignores without identifiers or comments Apr 30, 2025
@calebdw calebdw force-pushed the calebdw/push-qtlvsunynsrq branch from 108c052 to 384c8af Compare April 30, 2025 20:58
@calebdw calebdw force-pushed the calebdw/push-qtlvsunynsrq branch from 384c8af to 0475ff1 Compare April 30, 2025 21:05
@NanoSector
Copy link

Thanks for providing this & also picking up the case for no comments 🙌

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

Successfully merging this pull request may close these issues.

Option to disable phpstan-ignore-line and phpstan-ignore-next-line
2 participants