mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
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 #365.
This commit is contained in:
parent
a7be77f761
commit
7db4f246a7
6 changed files with 83 additions and 17 deletions
|
|
@ -66,6 +66,8 @@ Index of Options
|
|||
|
||||
- :option:`flake8 --select`
|
||||
|
||||
- :option:`flake8 --extend-select`
|
||||
|
||||
- :option:`flake8 --disable-noqa`
|
||||
|
||||
- :option:`flake8 --show-source`
|
||||
|
|
@ -611,6 +613,38 @@ Options and their Descriptions
|
|||
F
|
||||
|
||||
|
||||
.. option:: --extend-select=<errors>
|
||||
|
||||
:ref:`Go back to index <top>`
|
||||
|
||||
.. versionadded:: 3.9.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>`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue