Skip to content

Squiz/FunctionCommentThrowTag: bug fix - jump over attributes #936

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

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 5, 2025

Description

Turns out this sniff was never updated to deal with attributes potentially being between a function declaration and the docblock preceding it, which could lead to false negatives.

Fixed now.

Includes test.

Suggested changelog entry

Squiz.Commenting.FunctionCommentThrowTag : sniff would bow out when function has attributes attached leading to false negatives

Turns out this sniff was never updated to deal with attributes potentially being between a function declaration and the docblock preceding it, which could lead to false negatives.

Fixed now.

Includes test.
@jrfnl jrfnl added this to the 3.12.2 milestone Apr 5, 2025
@jrfnl jrfnl merged commit 5349ce9 into master Apr 9, 2025
250 of 265 checks passed
@jrfnl jrfnl deleted the feature/squiz-functioncommentthrowtag-improve-comment-tolerance branch April 9, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant