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 aebd84b
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 60 in aebd84b
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 279 in aebd84b
and adds colors.
Some ideas, but I'm sure someone can come up with a better one…
The text was updated successfully, but these errors were encountered:
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 aebd84b
The problem:
When you run with
--report=json --no-colors
the message is first JSON encodedPHP_CodeSniffer/src/Reports/Json.php
Line 60 in aebd84b
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 279 in aebd84b
and adds colors.
Possible solutions:
Some ideas, but I'm sure someone can come up with a better one…
Is there any need for colors in a JSON report?!
The text was updated successfully, but these errors were encountered: