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

Generic/DocComment: bug fix - don't remove ignore annotations when fixing #91

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 11, 2023

Description

Recreation of upstream PR squizlabs/PHP_CodeSniffer#3893:

The code sample included in the tests would previously result in an "There must be a single blank line after a tag group" error, even though there is a blank line after the @codeCoverageIgnore tag.

The auto-fixer would subsequently fix this by removing the @phpcs:disable comment + the blank line after it.

Fixed now.

Includes test.

Suggested changelog entry

Generic/DocComment: the SpacingAfterTagGroup fixer could accidentally remove ignore annotations.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

…xing

The code sample included in the tests would previously result in an "There must be a single blank line after a tag group" error, even though there _is_ a blank line after the `@codeCoverageIgnore` tag.

The auto-fixer would subsequently fix this by removing the `@phpcs:disable` comment + the blank line after it.

Fixed now.

Includes test.
@jrfnl jrfnl force-pushed the feature/generic-doccomment-fixer-removes-ignore-annotations branch from 991fa81 to 9397de6 Compare December 5, 2023 13:14
@jrfnl jrfnl merged commit b50cf54 into master Dec 5, 2023
64 checks passed
@jrfnl jrfnl deleted the feature/generic-doccomment-fixer-removes-ignore-annotations branch December 5, 2023 13:18
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