diff options
| author | Frank Winklmeier <fwinkl@users.noreply.github.com> | 2021-04-10 14:24:54 +0200 |
|---|---|---|
| committer | Frank Winklmeier <fwinkl@users.noreply.github.com> | 2021-04-11 20:40:53 +0200 |
| commit | f98afbf7d9b46a6c87a816d7459df1ba622498e0 (patch) | |
| tree | dcc2753ec1eec1cc9511b465f19c3065749ac0eb /docs/source/user | |
| parent | 9815f49cc48dec39977ca4954beb833ba489f969 (diff) | |
| download | flake8-f98afbf7d9b46a6c87a816d7459df1ba622498e0.tar.gz | |
Add --extend-select command line argument
Implement `--extend-select` command line argument following what was
done for `--extend-ignore` in !233. This option can be used to
selectively add individual codes without overriding the default list
entirely.
Addresses the remaining item of issue #1061.
Diffstat (limited to 'docs/source/user')
| -rw-r--r-- | docs/source/user/invocation.rst | 4 | ||||
| -rw-r--r-- | docs/source/user/options.rst | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/source/user/invocation.rst b/docs/source/user/invocation.rst index cddfab4..170a62a 100644 --- a/docs/source/user/invocation.rst +++ b/docs/source/user/invocation.rst @@ -115,6 +115,10 @@ And you should see something like: run. (Default: 79) --select=errors Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: ) + --extend-select errors + Comma-separated list of errors and warnings to add to + the list of selected ones. For example, ``--extend- + select=E4,E51,W234``. --disable-noqa Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end. --show-source Show the source generate each error or warning. diff --git a/docs/source/user/options.rst b/docs/source/user/options.rst index 885bb02..7141e7a 100644 --- a/docs/source/user/options.rst +++ b/docs/source/user/options.rst @@ -68,6 +68,8 @@ Index of Options - :option:`flake8 --select` +- :option:`flake8 --extend-select` + - :option:`flake8 --disable-noqa` - :option:`flake8 --show-source` @@ -632,6 +634,38 @@ Options and their Descriptions F +.. option:: --extend-select=<errors> + + :ref:`Go back to index <top>` + + .. versionadded:: 4.0.0 + + Specify a list of codes to add to the list of selected ones. Similar + considerations as in :option:`--select` apply here with regard to the + value. + + The difference to the :option:`--select` option is, that this option can be + used to selectively add individual codes without overriding the default + list entirely. + + Command-line example: + + .. prompt:: bash + + flake8 --extend-select=E4,E51,W234 dir/ + + This **can** be specified in config files. + + Example config file usage: + + .. code-block:: ini + + extend-select = + E4, + E51, + W234 + + .. option:: --disable-noqa :ref:`Go back to index <top>` |
