From 0204d636a1f8254e1a32f9cceac0e2588f55f72a Mon Sep 17 00:00:00 2001 From: Michal Siska Date: Sun, 28 Nov 2021 19:47:52 +0100 Subject: [PATCH] More descriptive documentation about config files. --- docs/source/user/configuration.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst index f26674b..3fdd087 100644 --- a/docs/source/user/configuration.rst +++ b/docs/source/user/configuration.rst @@ -25,7 +25,8 @@ Configuration Locations ======================= |Flake8| supports storing its configuration in your project in one of -``setup.cfg``, ``tox.ini``, or ``.flake8``. +``setup.cfg``, ``tox.ini``, or ``.flake8``. The configuration is not merged +across those files and files are considered in that particular order. Values set at the command line have highest priority, then those in the project configuration file, and finally there are the defaults. However, @@ -72,6 +73,15 @@ to be in the ``flake8`` section, which means it needs to start like so: [flake8] +.. note:: + + If your project does not use ``setup.cfg``, ``tox.ini``, neither + ``.flake8``, or they don't contain section ``flake8`` at all, the searching + for suitable configuration file will continue in project's parent + directories. This may lead to parsing no longer supported user-level + configuration at ``~/.flake8``. Please do not rely on this behaviour hence + we are supporting only per-project configuration. + Each command-line option that you want to specify in your config file can be named in either of two ways: