diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-11-21 10:02:37 +0100 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-11-21 10:02:37 +0100 |
commit | b8442a98cfd757a96ffbd7e69ca5956ec4ccdd7c (patch) | |
tree | 2cdeaaf6fccb84a82f76c5f37a044d52276a917d /doc | |
parent | 5c0c809051b851345e6e34b5c67f639bbf64b624 (diff) | |
download | pylint-b8442a98cfd757a96ffbd7e69ca5956ec4ccdd7c.tar.gz |
[doc]?backport https://bitbucket.org/jmcgeheeiv/pylintrc_search_doc/src/a3c82aa9fa1a7d78c0bd9eb965426c870428ff38/doc/run.rst
Diffstat (limited to 'doc')
-rw-r--r-- | doc/run.rst | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/doc/run.rst b/doc/run.rst index 4b0ccfa..1fb95cd 100644 --- a/doc/run.rst +++ b/doc/run.rst @@ -87,13 +87,32 @@ list of values (which are generally used to override a regular expression in special cases). For a full list of options, use ``--help`` Specifying all the options suitable for your setup and coding -standards can be tedious, so it is possible to use a rc file to -specify the default values. Pylint looks for ``/etc/pylintrc`` and -``~/.pylintrc``. The ``--generate-rcfile`` option will generate a -commented configuration file according to the current configuration on -standard output and exit. You can put other options before this one to -use them in the configuration, or start with the default values and -hand tune the configuration. +standards can be tedious, so it is possible to use a configuration file to +specify the default values. You can specify a configuration file on the +command line using the ``--rcfile`` option. Otherwise, Pylint searches for a +configuration file in the following order and uses the first one it finds: + +#. ``pylintrc`` in the current working directory +#. If the current working directory is in a Python module, Pylint searches \ + up the hierarchy of Python modules until it finds a ``pylintrc`` file. \ + This allows you to specify coding standards on a module-by-module \ + basis. Of course, a directory is judged to be a Python module if it \ + contains an ``__init__.py`` file. +#. The file named by environment variable ``PYLINTRC`` +#. ``.pylintrc`` in your home directory, unless you have no home directory or \ + your home directory is ``/root`` +#. ``.pylintrc`` in the current working directory +#. ``/etc/pylintrc`` + +The ``--generate-rcfile`` option will generate a commented configuration file +on standard output according to the current configuration and exit. This +includes: + +* Any configuration file found as explained above +* Options appearing before ``--generate-rcfile`` on the Pylint command line + +Of course you can also start with the default values and hand tune the +configuration. Other useful global options include: @@ -106,5 +125,3 @@ Other useful global options include: --list-msgs Generate pylint's messages. --full-documentation Generate pylint's full documentation, in reST format. - - |