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.63k stars 1.48k forks source link

Fix two line wrapping bugs in default report formatter #3925

Closed anomiex closed 7 months ago

anomiex commented 8 months ago

Description

The first is that the ANSI escape codes applied to bold the message when -s is used were not being taken into account when wrapping the lines for width, causing some lines to be wrapped unnecessarily.

The second is that when lines were wrapped in the middle of a long message, the | characters making up the table were being bolded along with the message.

Suggested changelog entry

Related issues/external references

Fixes #3924

Types of changes

PR checklist