Is it possible to have both stdout and file output in one run?
See original GitHub issueUser story. As a user, I can do run spectral lint with params, so that I can both see the stdout text output and receive report as an html-file.
Is your feature request related to a problem? Well I have a report file that is then published but I’d also like to have visible output in a gitlab job which shows stdout
Describe the solution you’d like
Maybe additional parameter --stdout-format
that locks stdout output in a chosen format, --output
param does its thing as it currently does independently. If --stdout-format
is absent then --output
suppresses stdout as it does now.
NOTE: I kinda need different formats here as we publish html reports, which are well not stdout-friendly, so just removing stdout suppression by output wouldn’t be enough
Additional context I could try to implement this at least in a rough draft if somebody points me to where it’s handled in the src. I couldn’t find by myself. I also might fail miserably since I’m not a js/ts-developer.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
When discussing things like this I try to find out what similar tools are doing, and what pros and cons their teams noticed.
Eslint said nope, use the JavaScript api, which… yeah you could do that if running it twice isn’t an option. https://github.com/eslint/eslint/issues/8185
If you can find a similar tool which does allow this, it would be good to see how they’re handling it.
Sorry, this doesn’t seem like a use case thats common enough for us to try and figure out. If anyone in the future spots this and fancies sending a PR that would be amazing, but there’s loads of other stuff on our plate. Best of luck!