We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I’m right, ANSI color codes get removed here, if you e.g. supply the switch --no-colors:
--no-colors
PHP_CodeSniffer/src/Reporter.php
Line 239 in c6c65ca
When you run with --report=json --no-colors the message is first JSON encoded
--report=json --no-colors
PHP_CodeSniffer/src/Reports/Json.php
Line 59 in c6c65ca
so, that afterwards the color code removal fails, as the initial message is now encoded.
For example:
Before: ... "\033[30;1m·\033[0m" ... After: ... "\u001b[30;1m\u00b7\u001b[0m\u001b[30;1m\u00b7\u001b[0m" ...
It happens for example with LanguageConstructSpacingSniff (add multiple spaces somewhere) that calls
LanguageConstructSpacingSniff
PHP_CodeSniffer/src/Util/Common.php
Line 276 in c6c65ca
and adds colors.
The text was updated successfully, but these errors were encountered:
Ooops, wrong repo… 😳 CU on PHPCSStandards/PHP_CodeSniffer…
Sorry, something went wrong.
No branches or pull requests
If I’m right, ANSI color codes get removed here, if you e.g. supply the switch
--no-colors
:PHP_CodeSniffer/src/Reporter.php
Line 239 in c6c65ca
The problem:
When you run with
--report=json --no-colors
the message is first JSON encodedPHP_CodeSniffer/src/Reports/Json.php
Line 59 in c6c65ca
so, that afterwards the color code removal fails, as the initial message is now encoded.
For example:
To reproduce:
It happens for example with
LanguageConstructSpacingSniff
(add multiple spaces somewhere) that callsPHP_CodeSniffer/src/Util/Common.php
Line 276 in c6c65ca
and adds colors.
Possible solutions:
Is there any need for colors in a JSON report?!
The text was updated successfully, but these errors were encountered: