diff options
author | Kevin Locke <kevin@kevinlocke.name> | 2019-02-17 10:12:24 -0700 |
---|---|---|
committer | Kevin Locke <kevin@kevinlocke.name> | 2019-02-17 10:40:50 -0700 |
commit | 3300b1aca7f53a8468547194d074e1cb5bc55e15 (patch) | |
tree | b91fa66db7c68e172c26ea6739a02ddb1786af2a /autoload | |
parent | c3d4e0983b4b08e61692cdd88990a79525a78707 (diff) | |
download | ale-3300b1aca7f53a8468547194d074e1cb5bc55e15.zip |
python/pylint: Change directory to project root
Pylint only [checks for pylintrc] (and .pylintrc) files in the packages
aboves its current directory before falling back to user and global
pylintrc. For projects with a src dir, running pylint from the
directory containing the file will not use the project pylintrc.
Adopt the convention used by many other Python linters of running from
the project root, which solves this issue. Add pylintrc and .pylintrc
to FindProjectRoot. Update docs.
[checks for pylintrc]: https://github.com/PyCQA/pylint/blob/pylint-2.2.2/pylint/config.py#L106
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/python.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index c911c046..2f28214b 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -28,6 +28,8 @@ function! ale#python#FindProjectRootIni(buffer) abort \|| filereadable(l:path . '/flake8.cfg') \|| filereadable(l:path . '/.flake8rc') \|| filereadable(l:path . '/pylama.ini') + \|| filereadable(l:path . '/pylintrc') + \|| filereadable(l:path . '/.pylintrc') \|| filereadable(l:path . '/Pipfile') \|| filereadable(l:path . '/Pipfile.lock') return l:path |