| Q | A
| ---------------- | -----
| Bug report? | no
| Feature request? | yes
| Library version | 1.9.0
When running the command within my CI setup (docker run -it --rm -v $(pwd):/app nunomaduro/phpinsights), my wish to get the export done in json is not satisfied.
It'd be wise to facilitate integration (as it would also work locally), by providing the output formatting like :
return [
"format" => [
// "json" would default to "stdout", if no path provided.
"json" => "/path/to/phpinsights/results.json"
],
....
]
Like this, when running the docker command, the exports would be more useful in CI scripts (if anyone has an history of quality/tests results)
Great idea, that makes a ton of sense to add support for specifying the format in the config.
This would however require two new features:
If anybody wanna tackle this, then command argument should have higher priority than config file setting.
Would this be a valid Configuration?
return [
"format" => [
"checkstyle" => "/path/to/phpinsights/results.xml"
"json" => "/path/to/phpinsights/results.json",
"console"
],
....
]
What If I configure multiple Outputs to the same destination?
@MrMadClown Great question, what if we split it up in two fields instead?
'format' => 'json',
'file' => '/path/to/phpinsights/results.json',
If file is not supplied, then it goes to console instead.
However this could also be opened up for custom outputters instead. So we have a console output and a file output that both implements the output interface.
This would open up for if a user wanted to send the config file directly to a third party service, they could just change the outputter to a custom one.
What do you guys think?
Most helpful comment
@MrMadClown Great question, what if we split it up in two fields instead?
If file is not supplied, then it goes to console instead.
However this could also be opened up for custom outputters instead. So we have a console output and a file output that both implements the output interface.
This would open up for if a user wanted to send the config file directly to a third party service, they could just change the outputter to a custom one.
What do you guys think?