Closed bantu closed 2 years ago
I see https://github.com/squizlabs/PHP_CodeSniffer/commit/d4f33dbf45aa5bb78e077b0e73306746c8bd98cf which allows to discard the unwanted report output by redirecting stdout accordingly. However, this commit does not seem to be in 3.7.
@bantu Try running PHPCS like so:
vendor/bin/phpcs
-v
--extensions=php
--report=junit
--report-file=phpcs-report.xml
--standard=PSR2
src/
tests/
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting#writing-a-report-to-a-file
@jrfnl Thanks for the suggestion. The behavior is the same for me.
@bantu Okay, so there are two things going on here:
stdout
.This second part is due to your use of the -v
option, which is a debugging option. If you want to see progress (without the debugging info), use the -p
option instead and you will only get the report in the file and no longer on the screen.
@jrfnl Interesting. The documentation in --help does not mention that -v is a debug option, but says "Print processed files", which seems to be exactly what I want.
Describe the bug
I run version 3.7.1 installed via composer as follows:
Expected behavior I expect progress information on stdout due to -v and an xml report in a phpcs-report.xml file.
Actual behavior I am seeing progress information, but the xml report is also output on stdout.
Versions (please complete the following information):