forked from github-mirrors/ale
[ale-python-root] add `.pyre_configuration.local` to list of files (#3900)
Without this, we have one `pyre` process running across different pyre projects. With this change, files in different projects can be linted with pyre at the same time. Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
This commit is contained in:
parent
19437e25d0
commit
f769f64c07
|
@ -24,6 +24,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||
\|| filereadable(l:path . '/setup.cfg')
|
||||
\|| filereadable(l:path . '/pytest.ini')
|
||||
\|| filereadable(l:path . '/tox.ini')
|
||||
\|| filereadable(l:path . '/.pyre_configuration.local')
|
||||
\|| filereadable(l:path . '/mypy.ini')
|
||||
\|| filereadable(l:path . '/pycodestyle.cfg')
|
||||
\|| filereadable(l:path . '/.flake8')
|
||||
|
|
|
@ -35,6 +35,7 @@ ALE will look for configuration files with the following filenames. >
|
|||
setup.cfg
|
||||
pytest.ini
|
||||
tox.ini
|
||||
.pyre_configuration.local
|
||||
mypy.ini
|
||||
pycodestyle.cfg
|
||||
.flake8
|
||||
|
|
|
@ -57,3 +57,10 @@ Execute(Poetry is detected when python_pyre_auto_poetry is set):
|
|||
|
||||
AssertLinter 'poetry',
|
||||
\ ale#Escape('poetry') . ' run pyre persistent'
|
||||
|
||||
Execute(The FindProjectRoot should detect the project root directory for namespace package via .pyre_configuration.local):
|
||||
silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/pyre_configuration_dir/foo/bar.py')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#Simplify(g:dir . '/../test-files/python/pyre_configuration_dir'),
|
||||
\ ale#python#FindProjectRoot(bufnr(''))
|
||||
|
|
Loading…
Reference in New Issue