Skip to content

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
@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