mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:53 +00:00
Respect file exclusions in ruff server
(#11590)
## Summary Closes https://github.com/astral-sh/ruff/issues/11587. ## Test Plan - Added a lint error to `test_server.py` in `vscode-ruff`. - Validated that, prior to this change, diagnostics appeared in the file. - Validated that, with this change, no diagnostics were shown. - Validated that, with this change, no diagnostics were fixed on-save.
This commit is contained in:
parent
531ae5227c
commit
204c59e353
11 changed files with 235 additions and 43 deletions
|
@ -479,7 +479,7 @@ impl DocumentQuery {
|
|||
}
|
||||
|
||||
/// Get the underlying file path for the document selected by this query.
|
||||
pub(crate) fn file_path(&self) -> &PathBuf {
|
||||
pub(crate) fn file_path(&self) -> &Path {
|
||||
match self {
|
||||
Self::Text { file_path, .. } | Self::Notebook { file_path, .. } => file_path,
|
||||
}
|
||||
|
|
|
@ -73,10 +73,17 @@ impl RuffSettings {
|
|||
}
|
||||
}
|
||||
|
||||
/// Return the [`ruff_workspace::FileResolverSettings`] for this [`RuffSettings`].
|
||||
pub(crate) fn file_resolver(&self) -> &ruff_workspace::FileResolverSettings {
|
||||
&self.file_resolver
|
||||
}
|
||||
|
||||
/// Return the [`ruff_linter::settings::LinterSettings`] for this [`RuffSettings`].
|
||||
pub(crate) fn linter(&self) -> &ruff_linter::settings::LinterSettings {
|
||||
&self.linter
|
||||
}
|
||||
|
||||
/// Return the [`ruff_workspace::FormatterSettings`] for this [`RuffSettings`].
|
||||
pub(crate) fn formatter(&self) -> &ruff_workspace::FormatterSettings {
|
||||
&self.formatter
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue