Closed danalloway closed 8 years ago
There are several problems with your PR.
--report-json
makes PHPCS to write all reports in one file overwriting its contents.At the same we should have a way to change reports format. The only way I see right now it to use a parse-able format like JSON inside of a plugin and introduce a bunch of formatters that will be applied to raw data.
Another way is to use file reporter with --report
option. The only drawback is that we cannot use more
than one format.
wow, totally missed that, did not realize it was running it for every file. thanks for getting me up to speed.
using the --report option with file reporter would be nice, even if it's just one type, that would get me half way to where I need to be with this.
regardless, closing this PR thank you!
wow, totally missed that, did not realize it was running it for every file. thanks for getting me up to speed.
Actually I just don't see another option of how pass files trough stdin to PHPCS (gulp way) and make it deal with more than one file.
using the --report option with file reporter would be nice, even if it's just one type, that would get me half way to where I need to be with this.
There is still a problem. Some formats (like JSON) becomes corrupted if reports for several files (several JSON objects) are just concatenated. The only way to overcome it is in implementing of all the formatters inside of gulp-phpcs. I don't like this idea much though.
Am I miss something? Don't you see any other way of how formatting can be done?
this PR adds another option to the plugin allowing for passing through parameters to generate the built-in reports that PHPCS offers.
to use it, try running
you can read more on this from the PHPCS docs https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting