Add option `--quiet`
When passed, output only errors, not output package valid
Maybe --quiet?
- can be shortened to -q
- it's not completely silent on failure
@epoberezkin sgtm, thanks :smile:
Shouldn't > /dev/null take care of that? I believe, errors will still be reported, since they will be sent to STDERR
This bug is still valid and is more severe than initially stated, as at this moment the tool dumps entire output on stderr, including the found violations. Current bug prevents parsing of tool output by other tools.
Stderr is supposed to be used for errors and logging but not for the final result of a program. As a linter/validator is expected to report found errors, these are supposed to go on stdout, as they are the result of execution. Which files are parsed or other verbose information should stay on stderr.
It is easy to get this wrong as the term error can easily be misunderstood: the found issues with a schema are not execution errors, so they go to stdout. If the program fails to open a file or encounters other fatal issues, these should go to stderr.
Based on my tests what needs to be corrected is the printing of found issues and to assure these go to stdout. The logging like
I suppose fixing this is a one liner, but before making a pull-request I would like to get a confirmation from the project owner.
https://en.wikipedia.org/wiki/Standard_streams contains some explanations on correct use of standard stream but I can also find other resources if needed.