sphinx-lint icon indicating copy to clipboard operation
sphinx-lint copied to clipboard

[feature request] Add option to store output in file as well

Open rffontenelle opened this issue 1 year ago • 2 comments
trafficstars

When running sphinx-lint in CI environment, I'd like to have the syntax issues to be both printed to the output and stored in a log file, because the output will be annotated with sphinx-lint-problem-matcher in the GitHub Actions output, and the log file will be upload as an artifact to notify outside GitHub.

In this scenario, If I simply redirect sphinx-lint > file I get no output, if I redirect using tee (to get both console and log) I won't get my Shell script to quit after the error status when set -e (If I set -o pipefail, tee wouldn't be run as sphinx-lint would exit with error before).

Taking Sphinx as example, its -w flag store warnings in log file but still print to output.

rffontenelle avatar Oct 22 '24 17:10 rffontenelle