diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-06-14 20:10:09 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-06-14 20:10:09 -0500 |
| commit | 8a18cfa4a321218a67c322dcf70fe4d11efb92ca (patch) | |
| tree | 224a10a4e1c8ccb204bbc2399b50d7a963d081f0 /docs/source/user | |
| parent | 18d6e6264cca194567e3e75ae0efe1df05ed57ea (diff) | |
| download | flake8-8a18cfa4a321218a67c322dcf70fe4d11efb92ca.tar.gz | |
Add documentation around specifying a format string
Diffstat (limited to 'docs/source/user')
| -rw-r--r-- | docs/source/user/options.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/source/user/options.rst b/docs/source/user/options.rst index e336daa..9e998ee 100644 --- a/docs/source/user/options.rst +++ b/docs/source/user/options.rst @@ -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 |
