diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2014-04-11 12:15:20 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2014-04-11 12:15:20 +0200 |
commit | 2ae65d5180f8ac99de4b166ec6640d980d7b4ca1 (patch) | |
tree | 33ee54b9f1aacc6f54f29e18d68fd923968eb7af | |
parent | 3e4ce35501bfac4c679bb77def3065a83f53b6c6 (diff) | |
download | pylint-2ae65d5180f8ac99de4b166ec6640d980d7b4ca1.tar.gz |
Additionaly search for rc file in ~/.config/pylintrc. Closes #121
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | config.py | 2 | ||||
-rw-r--r-- | doc/run.rst | 9 |
3 files changed, 18 insertions, 10 deletions
@@ -6,24 +6,24 @@ ChangeLog for Pylint * Do not crash with UnknownMessage if an unknown message ID/name appears in disable or enable in the configuration. Patch by Cole Robinson. Fixes bitbucket issue #170. - + * Add new warning 'eval-used', checking that the builtin function `eval` was used. * Make it possible to show a naming hint for invalid name by setting include-naming-hint. Also make the naming hints configurable. Fixes BitBucket issue #138. - - * Added support for enforcing multiple, but consistent name styles for + + * Added support for enforcing multiple, but consistent name styles for different name types inside a single module; based on a patch written by morbo@google.com. * Also warn about empty docstrings on overridden methods; contributed by sebastianu@google.com. - - * Also inspect arguments to constructor calls, and emit relevant + + * Also inspect arguments to constructor calls, and emit relevant warnings; contributed by sebastianu@google.com. - + * Added a new configuration option logging-modules to make the list of module names that can be checked for 'logging-not-lazy' et. al. configurable; contributed by morbo@google.com. @@ -62,7 +62,7 @@ ChangeLog for Pylint * Do not warn about 'return-arg-in-generator' in Python 3.3+. * Do not warn about 'abstract-method' when the abstract method - is implemented through assignment (#155). + is implemented through assignment (#155). * Improve cyclic import detection in the case of packages, patch by Buck Golemon @@ -70,6 +70,9 @@ ChangeLog for Pylint * Add new warnings for checking proper class __slots__: 'invalid-slots-object' and 'invalid-slots'. + * Search for rc file in `~/.config/pylintrc` if `~/.pylintrc` + doesn't exists (#121) + 2013-12-22 -- 1.1.0 * Add new check for use of deprecated pragma directives "pylint:disable-msg" @@ -97,6 +97,8 @@ def find_pylintrc(): pylintrc = ".pylintrc" else: pylintrc = join(user_home, '.pylintrc') + if not isfile(pylintrc): + pylintrc = join(user_home, '.config', 'pylintrc') if not isfile(pylintrc): if isfile('/etc/pylintrc'): pylintrc = '/etc/pylintrc' diff --git a/doc/run.rst b/doc/run.rst index 1fb95cd..4e752b0 100644 --- a/doc/run.rst +++ b/doc/run.rst @@ -99,9 +99,12 @@ configuration file in the following order and uses the first one it finds: 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 +#. if you have a home directory which isn't ``/root``: + + #. ``.pylintrc`` in your home directory + #. ``.config/pylintrc`` in your home directory + + else, ``.pylintrc`` in the current working directory #. ``/etc/pylintrc`` The ``--generate-rcfile`` option will generate a commented configuration file |