Add documentation around specifying a format string

This commit is contained in:
Ian Cordasco 2016-06-14 20:10:09 -05:00
parent 18d6e6264c
commit 8a18cfa4a3
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A

View file

@ -225,17 +225,30 @@
By default, there are two formatters available:
- default
- pylint
Other formatters can be installed. Refer to their documentation for the
name to use to select them.
name to use to select them. Further, users can specify they're own format
string. The variables available are:
- code
- col
- path
- row
- text
The default formatter has a format string of:
.. code-block:: python
'%(path)s:%(row)d:%(col)d: %(code)s %(text)s'
Command-line example:
.. prompt:: bash
flake8 --format=pylint dir/
flake8 --format='%(path)s::%(row)d,%(col)d::%(code)s::%(text)s' dir/
This **can** be specified in config files.
@ -244,6 +257,7 @@
.. code-block:: ini
format=pylint
format=%(path)s::%(row)d,%(col)d::%(code)s::%(text)s
.. option:: --hang-closing