-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruff server
detects config file differently to ruff check
#11506
Comments
And here a minimal example: pyproject.toml: [tool.ruff.lint]
select = ["NPY"] repo/pyproject.toml: empty repo/file.py (should raise NPY002): import numpy as np
np.random.uniform(100) Relevant config in .vimrc: if executable('ruff')
au User lsp_setup call lsp#register_server({
\ 'name': 'ruff-server',
\ 'cmd': {server_info->['ruff', 'server', '--preview']},
\ 'allowlist': ['python'],
\ 'workspace_config': {'configurationPreference': 'filesystemFirst'},
\ })
endif Log of LSP client: LogDo 23 Mai 2024 10:14:57 CEST:["lsp#register_server","server registered","ruff-server"] |
Thank you for opening this issue. I was able to reproduce this locally in Helix. I'll look into it 👍 |
## Summary Fixes #11506. `RuffSettingsIndex::new` now searches for configuration files in parent directories. ## Test Plan I confirmed that the original test case described in the issue worked as expected.
Thank you for the fast fix! |
Hi,
I just tried the new
ruff server
(ruff 0.4.5) and noticed that it detects its configuration file differently toruff check
. I have a repo with apyproject.toml
containing noruff
configuration. In the directory above there is apyproject.toml
containing configuration forruff
(in this case enabling additional rules). If I useruff check
from inside the repo, it works as expected and uses the enabled rules. Usingruff server
inside of vim using the plugin vim-lsp doesn't enable the additional rules. If I add the rules to thepyproject.toml
inside of the repo, they are detected byruff server
too.From the documentation of
ruff server
it is not clear to me, if this is expected behaviour. As a user ofruff check
andruff server
I would expect them to behave equivalently.The text was updated successfully, but these errors were encountered: