squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.66k stars 1.48k forks source link

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

Closed jrfnl closed 9 months ago

jrfnl commented 11 months ago

Description

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

Types of changes

jrfnl commented 9 months ago

Closing as replaced by https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/91

jrfnl commented 8 months ago

FYI: this fix is included in today's PHP_CodeSniffer 3.8.0 release.

As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo).