mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
Add --tee option to split report output stream.
The --tee option allows the linter report to be written to stdout, even though it is being redirected to a file with the --output-file option. This is useful if I want to store the report in a separate file for later analysis but also be able to print the output on screen (e.g when running in a CI environment).
This commit is contained in:
parent
f82b5d62d0
commit
c782060a06
5 changed files with 43 additions and 7 deletions
|
|
@ -125,6 +125,7 @@ And you should see something like:
|
|||
available to use. (Default: auto)
|
||||
--output-file=OUTPUT_FILE
|
||||
Redirect report to a file.
|
||||
--tee Write to stdout and output-file.
|
||||
--append-config=APPEND_CONFIG
|
||||
Provide extra config files to parse in addition to the
|
||||
files found by Flake8 by default. These files are the
|
||||
|
|
|
|||
|
|
@ -563,6 +563,26 @@
|
|||
output_file = output.txt
|
||||
|
||||
|
||||
.. option:: --tee
|
||||
|
||||
Also print output to stdout if output-file has ben configured.
|
||||
|
||||
Command-line example:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
flake8 --tee --output-file=output.txt dir/
|
||||
|
||||
This **can** be specified in config files.
|
||||
|
||||
Example config file usage:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
output-file = output.txt
|
||||
tee = True
|
||||
|
||||
|
||||
.. option:: --append-config=<config>
|
||||
|
||||
Provide extra config files to parse in after and in addition to the files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue