diff options
| author | Martin Domke <mdomke@jackbird.local> | 2016-07-26 15:57:13 +0200 |
|---|---|---|
| committer | Martin Domke <mdomke@jackbird.local> | 2016-07-26 15:57:13 +0200 |
| commit | c782060a0620135b01eb64e15508cca581cb09be (patch) | |
| tree | 36feb56558630a3b5727485150b3709efa6d2d4b /src/flake8/main/options.py | |
| parent | f82b5d62d0c4e48b95466bb259f3401aecf28de7 (diff) | |
| download | flake8-c782060a0620135b01eb64e15508cca581cb09be.tar.gz | |
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).
Diffstat (limited to 'src/flake8/main/options.py')
| -rw-r--r-- | src/flake8/main/options.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flake8/main/options.py b/src/flake8/main/options.py index c725c38..a94323b 100644 --- a/src/flake8/main/options.py +++ b/src/flake8/main/options.py @@ -26,6 +26,7 @@ def register_default_options(option_manager): - ``--exit-zero`` - ``-j``/``--jobs`` - ``--output-file`` + - ``--tee`` - ``--append-config`` - ``--config`` - ``--isolated`` @@ -171,6 +172,11 @@ def register_default_options(option_manager): help='Redirect report to a file.', ) + add_option( + '--tee', default=False, parse_from_config=True, action='store_true', + help='Write to stdout and output-file.', + ) + # Config file options add_option( |
