mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
[red-knot] User-level configuration (#16021)
## Summary This PR adds support for user-level configurations (`~/.config/knot/knot.toml`) to Red Knot. Red Knot will watch the user-level configuration file for changes but only if it exists when the process start. It doesn't watch for new configurations, mainly to simplify things for now (it would require watching the entire `.config` directory because the `knot` subfolder might not exist either). The new `ConfigurationFile` struct seems a bit overkill for now but I plan to use it for hierarchical configurations as well. Red Knot uses the same strategy as uv and Ruff by using the etcetera crate. ## Test Plan Added CLI and file watching test
This commit is contained in:
parent
f7819e553f
commit
af832560fc
11 changed files with 511 additions and 63 deletions
|
@ -1,7 +1,12 @@
|
|||
pub use glob::PatternError;
|
||||
pub use memory_fs::MemoryFileSystem;
|
||||
|
||||
#[cfg(all(feature = "testing", feature = "os"))]
|
||||
pub use os::testing::UserConfigDirectoryOverrideGuard;
|
||||
|
||||
#[cfg(feature = "os")]
|
||||
pub use os::OsSystem;
|
||||
|
||||
use ruff_notebook::{Notebook, NotebookError};
|
||||
use std::error::Error;
|
||||
use std::fmt::Debug;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue